mirror of
https://github.com/mangosfour/server.git
synced 2025-12-27 01:37:04 +00:00
[10823] Clear way access/set UNIT_FIELD_BYTES_*/PLAYER_BYTES* byte fields.
Fix some bugs when all uint32 field modified instead byte parts. In some cases added byte way set/get but code line itself need additinal reserch/fix for use correctness in line pos.
This commit is contained in:
parent
9e071e4483
commit
b967848e42
5 changed files with 63 additions and 50 deletions
|
|
@ -197,12 +197,14 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
|
|||
case SUMMON_PET:
|
||||
petlevel=owner->getLevel();
|
||||
|
||||
SetUInt32Value(UNIT_FIELD_BYTES_0, 2048);
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, 1, CLASS_MAGE);
|
||||
SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
// this enables popup window (pet dismiss, cancel)
|
||||
break;
|
||||
case HUNTER_PET:
|
||||
SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100);
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, 1, CLASS_WARRIOR);
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, 2, GENDER_NONE);
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, 3, POWER_FOCUS);
|
||||
SetSheath(SHEATH_STATE_MELEE);
|
||||
SetByteFlag(UNIT_FIELD_BYTES_2, 2, fields[9].GetBool() ? UNIT_CAN_BE_ABANDONED : UNIT_CAN_BE_RENAMED | UNIT_CAN_BE_ABANDONED);
|
||||
|
||||
|
|
@ -842,7 +844,9 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
|
|||
|
||||
if(cinfo->type == CREATURE_TYPE_BEAST)
|
||||
{
|
||||
SetUInt32Value(UNIT_FIELD_BYTES_0, 0x02020100);
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, 1, CLASS_WARRIOR);
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, 2, GENDER_NONE);
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, 3, POWER_FOCUS);
|
||||
SetSheath(SHEATH_STATE_MELEE);
|
||||
SetByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED | UNIT_CAN_BE_ABANDONED);
|
||||
SetUInt32Value(UNIT_MOD_CAST_SPEED, creature->GetUInt32Value(UNIT_MOD_CAST_SPEED));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue