mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10788] Replace bytes in single field bytes2 by independent fields for creature_addon.
This commit is contained in:
parent
9460ed0494
commit
0c8a7c3826
9 changed files with 50 additions and 22 deletions
|
|
@ -1852,20 +1852,19 @@ bool Creature::LoadCreatureAddon(bool reload)
|
|||
SetByteValue(UNIT_FIELD_BYTES_1, 3, uint8((cainfo->bytes1 >> 24) & 0xFF));
|
||||
}
|
||||
|
||||
if (cainfo->bytes2 != 0)
|
||||
{
|
||||
// 0 SheathState
|
||||
// 1 UnitPVPStateFlags Set at Creature::UpdateEntry (SetPvp())
|
||||
// 2 UnitRename Pet only, so always 0 for default creature
|
||||
// 3 ShapeshiftForm Must be determined/set by shapeshift spell/aura
|
||||
// UNIT_FIELD_BYTES_2
|
||||
// 0 SheathState
|
||||
// 1 UnitPVPStateFlags Set at Creature::UpdateEntry (SetPvp())
|
||||
// 2 UnitRename Pet only, so always 0 for default creature
|
||||
// 3 ShapeshiftForm Must be determined/set by shapeshift spell/aura
|
||||
if (cainfo->stash != 0)
|
||||
SetByteValue(UNIT_FIELD_BYTES_2, 0, cainfo->stash);
|
||||
|
||||
SetByteValue(UNIT_FIELD_BYTES_2, 0, uint8(cainfo->bytes2 & 0xFF));
|
||||
SetByteValue(UNIT_FIELD_BYTES_2, 1, uint8((cainfo->bytes2 >> 8) & 0xFF));
|
||||
//SetByteValue(UNIT_FIELD_BYTES_2, 2, uint8((cainfo->bytes2 >> 16) & 0xFF));
|
||||
SetByteValue(UNIT_FIELD_BYTES_2, 2, 0);
|
||||
//SetByteValue(UNIT_FIELD_BYTES_2, 3, uint8((cainfo->bytes2 >> 24) & 0xFF));
|
||||
SetByteValue(UNIT_FIELD_BYTES_2, 3, 0);
|
||||
}
|
||||
if (cainfo->pvp_state != 0)
|
||||
SetByteValue(UNIT_FIELD_BYTES_2, 1, cainfo->pvp_state);
|
||||
|
||||
//SetByteValue(UNIT_FIELD_BYTES_2, 2, 0);
|
||||
//SetByteValue(UNIT_FIELD_BYTES_2, 3, 0);
|
||||
|
||||
if (cainfo->emote != 0)
|
||||
SetUInt32Value(UNIT_NPC_EMOTESTATE, cainfo->emote);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue