mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-28 15:17:46 +00:00
fix playerstats packet
This commit is contained in:
parent
fb4f77c255
commit
b3f0f3afa1
3 changed files with 22 additions and 36 deletions
|
@ -982,6 +982,7 @@ namespace Sapphire::Network::Packets::Server
|
|||
*/
|
||||
struct FFXIVIpcPlayerStats : FFXIVIpcBasePacket< PlayerStats >
|
||||
{
|
||||
// order comes from baseparam order column
|
||||
uint32_t strength;
|
||||
uint32_t dexterity;
|
||||
uint32_t vitality;
|
||||
|
@ -991,45 +992,30 @@ namespace Sapphire::Network::Packets::Server
|
|||
uint32_t hp;
|
||||
uint32_t mp;
|
||||
uint32_t tp;
|
||||
uint32_t gp; // Set to 10000 as non-gatherer for some reason
|
||||
uint32_t gp;
|
||||
uint32_t cp;
|
||||
uint32_t unknown_2;
|
||||
uint32_t delay;
|
||||
uint32_t tenacity;
|
||||
uint32_t attack;
|
||||
uint32_t attackPower;
|
||||
uint32_t defense;
|
||||
uint32_t accuracy;
|
||||
uint32_t spellSpeed;
|
||||
uint32_t directHitRate;
|
||||
uint32_t evasion;
|
||||
uint32_t magicDefense;
|
||||
uint32_t criticalHitRate;
|
||||
uint32_t resistanceSlashing;
|
||||
uint32_t resistancePiercing;
|
||||
uint32_t resistanceBlunt;
|
||||
uint32_t criticalHit;
|
||||
uint32_t attackMagicPotency;
|
||||
uint32_t healingMagicPotency;
|
||||
uint32_t fire;
|
||||
uint32_t ice;
|
||||
uint32_t wind;
|
||||
uint32_t earth;
|
||||
uint32_t lightning;
|
||||
uint32_t water;
|
||||
uint32_t elementalBonus;
|
||||
uint32_t determination;
|
||||
uint32_t skillSpeed;
|
||||
uint32_t spellSpeed1;
|
||||
uint32_t spellSpeedMod;
|
||||
uint32_t unknown_6;
|
||||
uint32_t spellSpeed;
|
||||
uint32_t haste;
|
||||
uint32_t craftsmanship;
|
||||
uint32_t control;
|
||||
uint32_t gathering;
|
||||
uint32_t perception;
|
||||
uint32_t resistanceSlow;
|
||||
uint32_t resistanceSilence;
|
||||
uint32_t resistanceBlind;
|
||||
uint32_t resistancePoison;
|
||||
uint32_t resistanceStun;
|
||||
uint32_t resistanceSleep;
|
||||
uint32_t resistanceBind;
|
||||
uint32_t resistanceHeavy;
|
||||
uint32_t unknown_7[9]; // possibly level sync stats.
|
||||
|
||||
// todo: what is here?
|
||||
uint32_t unknown[26];
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -65,14 +65,16 @@ void EffectBuilder::damageTarget( Entity::CharaPtr& target, uint32_t amount, Com
|
|||
|
||||
void EffectBuilder::buildAndSendPackets()
|
||||
{
|
||||
Logger::info( "EffectBuilder result: " );
|
||||
Logger::info( "Targets afflicted: {}", m_resolvedEffects.size() );
|
||||
Logger::debug( "EffectBuilder result: " );
|
||||
Logger::debug( "Targets afflicted: {}", m_resolvedEffects.size() );
|
||||
|
||||
// test shit
|
||||
for( auto& effect : m_resolvedEffects )
|
||||
{
|
||||
auto& result = effect.second;
|
||||
|
||||
Logger::debug( " - id: {}", result->getTarget()->getId() );
|
||||
|
||||
auto effectPacket = std::make_shared< Server::EffectPacket >( m_sourceChara->getId(), result->getTarget()->getId(), m_actionId );
|
||||
effectPacket->setRotation( Common::Util::floatToUInt16Rot( m_sourceChara->getRot() ) );
|
||||
|
||||
|
|
|
@ -311,8 +311,8 @@ bool Sapphire::Entity::Player::isAutoattackOn() const
|
|||
|
||||
void Sapphire::Entity::Player::sendStats()
|
||||
{
|
||||
|
||||
auto statPacket = makeWorldPacket< FFXIVIpcPlayerStats >( getId() );
|
||||
|
||||
statPacket->data().strength = getStatValue( Common::BaseParam::Strength );
|
||||
statPacket->data().dexterity = getStatValue( Common::BaseParam::Dexterity );
|
||||
statPacket->data().vitality = getStatValue( Common::BaseParam::Vitality );
|
||||
|
@ -322,16 +322,14 @@ void Sapphire::Entity::Player::sendStats()
|
|||
statPacket->data().determination = getStatValue( Common::BaseParam::Determination );
|
||||
statPacket->data().hp = getStatValue( Common::BaseParam::HP );
|
||||
statPacket->data().mp = getStatValue( Common::BaseParam::MP );
|
||||
statPacket->data().accuracy = m_baseStats.accuracy;
|
||||
statPacket->data().attack = getStatValue( Common::BaseParam::AttackPower );
|
||||
statPacket->data().directHitRate = getStatValue( Common::BaseParam::DirectHitRate );
|
||||
statPacket->data().attackPower = getStatValue( Common::BaseParam::AttackPower );
|
||||
statPacket->data().attackMagicPotency = getStatValue( Common::BaseParam::AttackMagicPotency );
|
||||
statPacket->data().healingMagicPotency = getStatValue( Common::BaseParam::HealingMagicPotency );
|
||||
statPacket->data().skillSpeed = getStatValue( Common::BaseParam::SkillSpeed );
|
||||
statPacket->data().spellSpeed = getStatValue( Common::BaseParam::SpellSpeed );
|
||||
statPacket->data().spellSpeed1 = getStatValue( Common::BaseParam::SpellSpeed );
|
||||
statPacket->data().spellSpeedMod = 100;
|
||||
|
||||
statPacket->data().criticalHitRate = getStatValue( Common::BaseParam::CriticalHit );
|
||||
statPacket->data().haste = 100;
|
||||
statPacket->data().criticalHit = getStatValue( Common::BaseParam::CriticalHit );
|
||||
statPacket->data().defense = getStatValue( Common::BaseParam::Defense );
|
||||
statPacket->data().magicDefense = getStatValue( Common::BaseParam::MagicDefense );
|
||||
statPacket->data().tenacity = getStatValue( Common::BaseParam::Tenacity );
|
||||
|
|
Loading…
Add table
Reference in a new issue