[DiscordArchive] I guess removing the guard will send updates when it's really not needed, not sure how you would fix
[DiscordArchive] I guess removing the guard will send updates when it's really not needed, not sure how you would fix
Archived author: Revision • Posted: 2022-08-14T23:15:01.947000+00:00
Original source
I guess removing the guard will send updates when it's really not needed, not sure how you would fix that. I know one check would be if the mana is full, don't update. But.. yeah I don't know. Does it ever happen that the mana stays the same if it's not full? Isn't there always a small amount of mana regen?
Archived author: Anchy • Posted: 2022-08-14T23:15:39.051000+00:00
Original source
i thought that would fix it but its still not updating correctly ill take another look
Archived author: Anchy • Posted: 2022-08-14T23:31:10.778000+00:00
Original source
also pet power is handled in the same function
Archived author: Anchy • Posted: 2022-08-14T23:31:56.021000+00:00
Original source
so im betting if you fix one issue the other would be resolved
Archived author: Anchy • Posted: 2022-08-14T23:32:23.609000+00:00
Original source
it seems like a unit issue instead of a player issue
Archived author: Revision • Posted: 2022-08-14T23:33:10.363000+00:00
Original source
Oh, that makes sense. Kind of curious though.
Archived author: Anchy • Posted: 2022-08-14T23:34:35.030000+00:00
Original source
```cpp
// group update
if (GetTypeId() == TYPEID_PLAYER)
{
Player* player = ToPlayer();
if (getPowerType() == power && player->NeedSendSpectatorData())
ArenaSpectator::SendCommand_UInt32Value(FindMap(), GetGUID(), "CPW", power == POWER_RAGE || power == POWER_RUNIC_POWER ? val / 10 : val);
if (player->GetGroup())
player->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_CUR_POWER);
}
else if (Pet* pet = ToCreature()->ToPet())
{
if (pet->isControlled())
{
Unit* owner = GetOwner();
if (owner && (owner->GetTypeId() == TYPEID_PLAYER) && owner->ToPlayer()->GetGroup())
owner->ToPlayer()->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_CUR_POWER);
}
// Update the pet's character sheet with happiness damage bonus
if (pet->getPetType() == HUNTER_PET && power == POWER_HAPPINESS)
pet->UpdateDamagePhysical(BASE_ATTACK);
}```
Archived author: Anchy • Posted: 2022-08-14T23:34:45.616000+00:00
Original source
as you can see here it updates the group with the player and pets power
Archived author: Revision • Posted: 2022-08-14T23:35:13.472000+00:00
Original source
Yeah, I looked at the function.
Archived author: Anchy • Posted: 2022-08-14T23:35:13.665000+00:00
Original source
i know its not just when in a group thats the issue though so yeah kind of curious