Forums WoW Modding Support Archives Azerothcore Discord Archives [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

[DiscordArchive] I guess removing the guard will send updates when it's really not needed, not sure how you would fix

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
08-14-2022, 11:15 PM
#1
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?
rektbyfaith
08-14-2022, 11:15 PM #1

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?

rektbyfaith
Administrator
0
08-14-2022, 11:15 PM
#2
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
rektbyfaith
08-14-2022, 11:15 PM #2

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

rektbyfaith
Administrator
0
08-14-2022, 11:31 PM
#3
Archived author: Anchy • Posted: 2022-08-14T23:31:10.778000+00:00
Original source

also pet power is handled in the same function
rektbyfaith
08-14-2022, 11:31 PM #3

Archived author: Anchy • Posted: 2022-08-14T23:31:10.778000+00:00
Original source

also pet power is handled in the same function

rektbyfaith
Administrator
0
08-14-2022, 11:31 PM
#4
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
rektbyfaith
08-14-2022, 11:31 PM #4

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

rektbyfaith
Administrator
0
08-14-2022, 11:32 PM
#5
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
rektbyfaith
08-14-2022, 11:32 PM #5

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

rektbyfaith
Administrator
0
08-14-2022, 11:33 PM
#6
Archived author: Revision • Posted: 2022-08-14T23:33:10.363000+00:00
Original source

Oh, that makes sense. Kind of curious though.
rektbyfaith
08-14-2022, 11:33 PM #6

Archived author: Revision • Posted: 2022-08-14T23:33:10.363000+00:00
Original source

Oh, that makes sense. Kind of curious though.

rektbyfaith
Administrator
0
08-14-2022, 11:34 PM
#7
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);
}```
rektbyfaith
08-14-2022, 11:34 PM #7

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);
}```

rektbyfaith
Administrator
0
08-14-2022, 11:34 PM
#8
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
rektbyfaith
08-14-2022, 11:34 PM #8

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

rektbyfaith
Administrator
0
08-14-2022, 11:35 PM
#9
Archived author: Revision • Posted: 2022-08-14T23:35:13.472000+00:00
Original source

Yeah, I looked at the function.
rektbyfaith
08-14-2022, 11:35 PM #9

Archived author: Revision • Posted: 2022-08-14T23:35:13.472000+00:00
Original source

Yeah, I looked at the function.

rektbyfaith
Administrator
0
08-14-2022, 11:35 PM
#10
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
rektbyfaith
08-14-2022, 11:35 PM #10

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

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)