feat(Core/Misc): implement ObjectGuid class (port from TC) (#4885)

This commit is contained in:
UltraNix
2021-04-25 22:18:03 +02:00
committed by GitHub
parent 91081f4ad8
commit f4c226423d
568 changed files with 10655 additions and 11019 deletions

View File

@@ -39,7 +39,7 @@ public:
void Reset() override
{
_victimGUID = 0;
_victimGUID.Clear();
if (Unit* owner = me->GetOwner())
me->GetMotionMaster()->MoveFollow(owner, 0.0f, 0.0f);
@@ -72,7 +72,7 @@ public:
}
private:
uint64 _victimGUID;
ObjectGuid _victimGUID;
};
CreatureAI* GetAI(Creature* creature) const override
@@ -100,7 +100,7 @@ public:
struct npc_pet_gen_soul_trader_beaconAI : public ScriptedAI
{
uint64 ownerGUID;
ObjectGuid ownerGUID;
EventMap events;
npc_pet_gen_soul_trader_beaconAI(Creature* c) : ScriptedAI(c)
{
@@ -635,13 +635,13 @@ public:
npc_pet_gen_imp_in_a_bottleAI(Creature* c) : NullCreatureAI(c)
{
_talkTimer = 0;
_ownerGUID = 0;
_ownerGUID.Clear();
_hasParty = false;
}
WorldPacket _data;
uint32 _talkTimer;
uint64 _ownerGUID;
ObjectGuid _ownerGUID;
bool _hasParty;
void InitializeAI() override
@@ -661,7 +661,7 @@ public:
_data.Initialize(SMSG_MESSAGECHAT, 200); // guess size
_data << uint8(CHAT_MSG_MONSTER_PARTY);
_data << uint32(LANG_UNIVERSAL);
_data << uint64(me->GetGUID());
_data << me->GetGUID();
_data << uint32(0);
_data << uint32(me->GetName().size() + 1);
_data << me->GetName();
@@ -769,13 +769,13 @@ public:
{
npc_pet_gen_plump_turkeyAI(Creature* c) : PassiveAI(c)
{
goGUID = 0;
goGUID.Clear();
jumpTimer = 0;
checkTimer = 0;
jumping = false;
}
uint64 goGUID;
ObjectGuid goGUID;
uint32 jumpTimer;
uint32 checkTimer;
bool jumping;
@@ -893,7 +893,7 @@ public:
}
uint32 checkTimer;
uint64 targetGUID;
ObjectGuid targetGUID;
void IsSummonedBy(Unit* summoner) override
{
@@ -902,7 +902,7 @@ public:
me->SetOwnerGUID(summoner->GetGUID());
checkTimer = 0;
targetGUID = 0;
targetGUID.Clear();
me->CastSpell(me, 48649 /*SPELL_PET_TOY_FETCH_BALL_COME_HERE*/, true);
}