diff options
author | megamage <none@none> | 2009-05-28 18:43:57 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-28 18:43:57 -0500 |
commit | 1288761fb704be6d3c24e8480a809f66200ddf04 (patch) | |
tree | 22c38f099195d31b39989a5e86e180cf233961bf /src/game/Pet.cpp | |
parent | 451471d438e234698a91f15d63b17df3ec3327f4 (diff) |
[7905] Implement ACTION_T_SET_SHEATH for creature event ai make possibility set ranged fire state. Author: VladimirMangos
Also related cleanup code in field cases and player Player::SetSheath.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Pet.cpp')
-rw-r--r-- | src/game/Pet.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index 4d7c851b2df..cd920852952 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -197,7 +197,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool break; case HUNTER_PET: SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100); - SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE); + SetSheath(SHEATH_STATE_MELEE); SetByteValue(UNIT_FIELD_BYTES_2, 2, fields[9].GetBool() ? UNIT_RENAME_NOT_ALLOWED : UNIT_RENAME_ALLOWED); SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); @@ -747,7 +747,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature) if(cinfo->type == CREATURE_TYPE_BEAST) { SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100); - SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE ); + SetSheath(SHEATH_STATE_MELEE); SetByteValue(UNIT_FIELD_BYTES_2, 2, UNIT_RENAME_ALLOWED); SetUInt32Value(UNIT_MOD_CAST_SPEED, creature->GetUInt32Value(UNIT_MOD_CAST_SPEED)); } @@ -1676,7 +1676,7 @@ bool Pet::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint3 if(!InitEntry(Entry)) return false; - SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE); + SetSheath(SHEATH_STATE_MELEE); return true; } |