mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 07:37:45 +00:00
Several fixes and improvements
-Eobj will keep their animation flag even after respawning -Using !set classjob properly updates stats and UI -Using an emote while /changepose is active doesn't immediatly interrupt the emote anymore -GM2Command Logging moved to info instead of debug to match GM1 -//gm raise doesn't raise the target twice anymore -Fix modelSubWeapon always being reset to 0 upon logging in -Added TerritoryIntendedUses
This commit is contained in:
parent
a9e6c85a5e
commit
de160f96de
8 changed files with 41 additions and 9 deletions
|
@ -2079,7 +2079,7 @@ namespace Sapphire::Network::Packets::Server
|
||||||
uint16_t rotation;
|
uint16_t rotation;
|
||||||
int16_t unknown24a;
|
int16_t unknown24a;
|
||||||
int16_t unknown24b;
|
int16_t unknown24b;
|
||||||
uint16_t unknown28a;
|
uint16_t flag;
|
||||||
int16_t unknown28c;
|
int16_t unknown28c;
|
||||||
uint32_t housingLink;
|
uint32_t housingLink;
|
||||||
Common::FFXIVARR_POSITION3 position;
|
Common::FFXIVARR_POSITION3 position;
|
||||||
|
|
|
@ -25,7 +25,8 @@ Sapphire::Entity::EventObject::EventObject( uint32_t actorId, uint32_t objectId,
|
||||||
m_state( initialState ),
|
m_state( initialState ),
|
||||||
m_objectId( objectId ),
|
m_objectId( objectId ),
|
||||||
m_name( givenName ),
|
m_name( givenName ),
|
||||||
m_housingLink( 0 )
|
m_housingLink( 0 ),
|
||||||
|
m_flag( 0 )
|
||||||
{
|
{
|
||||||
m_id = actorId;
|
m_id = actorId;
|
||||||
m_pos.x = pos.x;
|
m_pos.x = pos.x;
|
||||||
|
@ -84,6 +85,12 @@ void Sapphire::Entity::EventObject::setState( uint8_t state )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t Sapphire::Entity::EventObject::getFlag() const
|
||||||
|
{
|
||||||
|
return m_flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Sapphire::Entity::EventObject::setAnimationFlag( uint32_t flag, uint32_t animationFlag )
|
void Sapphire::Entity::EventObject::setAnimationFlag( uint32_t flag, uint32_t animationFlag )
|
||||||
{
|
{
|
||||||
for( const auto& player : m_inRangePlayers )
|
for( const auto& player : m_inRangePlayers )
|
||||||
|
@ -131,6 +138,7 @@ void Sapphire::Entity::EventObject::spawn( Sapphire::Entity::PlayerPtr pTarget )
|
||||||
eobjStatePacket->data().actorId = getId();
|
eobjStatePacket->data().actorId = getId();
|
||||||
eobjStatePacket->data().housingLink = getHousingLink();
|
eobjStatePacket->data().housingLink = getHousingLink();
|
||||||
eobjStatePacket->data().rotation = Util::floatToUInt16Rot( getRot() );
|
eobjStatePacket->data().rotation = Util::floatToUInt16Rot( getRot() );
|
||||||
|
eobjStatePacket->data().flag = getFlag();
|
||||||
pTarget->queuePacket( eobjStatePacket );
|
pTarget->queuePacket( eobjStatePacket );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@ namespace Sapphire::Entity
|
||||||
|
|
||||||
float getScale() const;
|
float getScale() const;
|
||||||
|
|
||||||
|
uint8_t getFlag() const;
|
||||||
|
|
||||||
void setScale( float scale );
|
void setScale( float scale );
|
||||||
|
|
||||||
void setOnTalkHandler( OnTalkEventHandler handler );
|
void setOnTalkHandler( OnTalkEventHandler handler );
|
||||||
|
@ -54,6 +56,7 @@ namespace Sapphire::Entity
|
||||||
uint32_t m_gimmickId;
|
uint32_t m_gimmickId;
|
||||||
uint32_t m_objectId;
|
uint32_t m_objectId;
|
||||||
uint8_t m_state;
|
uint8_t m_state;
|
||||||
|
uint8_t m_flag;
|
||||||
float m_scale;
|
float m_scale;
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
TerritoryPtr m_parentInstance;
|
TerritoryPtr m_parentInstance;
|
||||||
|
|
|
@ -214,7 +214,7 @@ bool Sapphire::Entity::Player::load( uint32_t charId, World::SessionPtr pSession
|
||||||
|
|
||||||
m_mount = res->getUInt8( "Mount" );
|
m_mount = res->getUInt8( "Mount" );
|
||||||
|
|
||||||
m_modelSubWeapon = 0;
|
m_modelSubWeapon = getModelSubWeapon();
|
||||||
m_lastTickTime = 0;
|
m_lastTickTime = 0;
|
||||||
|
|
||||||
// first login, run the script event
|
// first login, run the script event
|
||||||
|
|
|
@ -227,9 +227,21 @@ void Sapphire::World::Manager::DebugCommandMgr::set( char* data, Entity::Player&
|
||||||
{
|
{
|
||||||
player.setLevelForClass( 1, static_cast< Common::ClassJob > ( id ) );
|
player.setLevelForClass( 1, static_cast< Common::ClassJob > ( id ) );
|
||||||
player.setClassJob( static_cast< Common::ClassJob > ( id ) );
|
player.setClassJob( static_cast< Common::ClassJob > ( id ) );
|
||||||
|
player.sendModel();
|
||||||
|
player.sendItemLevel();
|
||||||
|
player.calculateStats();
|
||||||
|
player.sendStats();
|
||||||
|
player.sendStatusEffectUpdate();
|
||||||
|
player.sendStatusUpdate();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
player.setClassJob( static_cast< Common::ClassJob > ( id ) );
|
player.setClassJob( static_cast< Common::ClassJob > ( id ) );
|
||||||
|
player.sendModel();
|
||||||
|
player.sendItemLevel();
|
||||||
|
player.calculateStats();
|
||||||
|
player.sendStats();
|
||||||
|
player.sendStatusEffectUpdate();
|
||||||
|
player.sendStatusUpdate();
|
||||||
}
|
}
|
||||||
else if( subCommand == "cfpenalty" )
|
else if( subCommand == "cfpenalty" )
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,6 +42,7 @@ namespace Sapphire::World::Manager
|
||||||
AllianceRaid = 8,
|
AllianceRaid = 8,
|
||||||
OpenWorldInstanceBattle = 9,
|
OpenWorldInstanceBattle = 9,
|
||||||
Trial = 10,
|
Trial = 10,
|
||||||
|
RaidPublicArea = 12,
|
||||||
HousingArea = 13,
|
HousingArea = 13,
|
||||||
HousingPrivateArea = 14,
|
HousingPrivateArea = 14,
|
||||||
MSQPrivateArea = 15,
|
MSQPrivateArea = 15,
|
||||||
|
@ -49,14 +50,24 @@ namespace Sapphire::World::Manager
|
||||||
RaidFights = 17,
|
RaidFights = 17,
|
||||||
ChocoboTutorial = 21,
|
ChocoboTutorial = 21,
|
||||||
Wedding = 22,
|
Wedding = 22,
|
||||||
|
DiademV1 = 26,
|
||||||
BeginnerTutorial = 27,
|
BeginnerTutorial = 27,
|
||||||
|
PvPTheFeast = 28,
|
||||||
|
MSQEventArea = 29,
|
||||||
FreeCompanyGarrison = 30,
|
FreeCompanyGarrison = 30,
|
||||||
PalaceOfTheDead = 31,
|
PalaceOfTheDead = 31,
|
||||||
TreasureMapInstance = 33,
|
TreasureMapInstance = 33,
|
||||||
EventTrial = 36,
|
EventTrial = 36,
|
||||||
TheFeastArea = 37,
|
TheFeastArea = 37, //custom match?
|
||||||
|
DiademV2 = 38,
|
||||||
PrivateEventArea = 40,
|
PrivateEventArea = 40,
|
||||||
//Eureka = 41, // wat
|
Eureka = 41, // wat
|
||||||
|
TheFeastCrystalTower = 42,
|
||||||
|
LeapOfFaith = 44,
|
||||||
|
MaskedCarnival = 45,
|
||||||
|
OceanFishing = 46,
|
||||||
|
DiademV3 = 47,
|
||||||
|
Bozja = 48,
|
||||||
};
|
};
|
||||||
|
|
||||||
TerritoryMgr();
|
TerritoryMgr();
|
||||||
|
|
|
@ -250,7 +250,7 @@ void Sapphire::Network::GameConnection::clientTriggerHandler( const Packets::FFX
|
||||||
{
|
{
|
||||||
player.setPose( static_cast< uint8_t >( param12 ) );
|
player.setPose( static_cast< uint8_t >( param12 ) );
|
||||||
auto pSetStatusPacket = makeActorControl( player.getId(), SetPose, param11, param12 );
|
auto pSetStatusPacket = makeActorControl( player.getId(), SetPose, param11, param12 );
|
||||||
player.sendToInRangeSet( pSetStatusPacket, true );
|
player.sendToInRangeSet( pSetStatusPacket, false );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ClientTriggerType::Return: // return dead / accept raise
|
case ClientTriggerType::Return: // return dead / accept raise
|
||||||
|
|
|
@ -612,7 +612,7 @@ void Sapphire::Network::GameConnection::gm2Handler( const Packets::FFXIVARR_PACK
|
||||||
const auto param4 = packet.data().param4;
|
const auto param4 = packet.data().param4;
|
||||||
const auto target = std::string( packet.data().target );
|
const auto target = std::string( packet.data().target );
|
||||||
|
|
||||||
Logger::debug( "{0} used GM2 commandId: {1}, params: {2}, {3}, {4}, {5}, target: {6}",
|
Logger::info( "{0} used GM2 commandId: {1}, params: {2}, {3}, {4}, {5}, target: {6}",
|
||||||
player.getName(), commandId, param1, param2, param3, param4, target );
|
player.getName(), commandId, param1, param2, param3, param4, target );
|
||||||
|
|
||||||
auto targetSession = serverMgr.getSession( target );
|
auto targetSession = serverMgr.getSession( target );
|
||||||
|
@ -649,8 +649,6 @@ void Sapphire::Network::GameConnection::gm2Handler( const Packets::FFXIVARR_PACK
|
||||||
targetPlayer->setStatus( Common::ActorStatus::Idle );
|
targetPlayer->setStatus( Common::ActorStatus::Idle );
|
||||||
targetPlayer->sendZoneInPackets( 0x01, 0x01, 0, 113, true );
|
targetPlayer->sendZoneInPackets( 0x01, 0x01, 0, 113, true );
|
||||||
|
|
||||||
|
|
||||||
targetPlayer->sendToInRangeSet( makeActorControlSelf( player.getId(), ZoneIn, 0x01, 0x01, 0, 113 ), true );
|
|
||||||
targetPlayer->sendToInRangeSet( makeActorControl( player.getId(), SetStatus,
|
targetPlayer->sendToInRangeSet( makeActorControl( player.getId(), SetStatus,
|
||||||
static_cast< uint8_t >( Common::ActorStatus::Idle ) ),
|
static_cast< uint8_t >( Common::ActorStatus::Idle ) ),
|
||||||
true );
|
true );
|
||||||
|
|
Loading…
Add table
Reference in a new issue