diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index 2e5f8e5ea..0dddea750 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -1264,7 +1264,7 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data) if(!item && !itemGuid.IsEmpty()) // cheating check 1 return; - if(item && item->GetGUID() != itemGuid.GetRawValue())// cheating check 2 + if(item && item->GetObjectGuid() != itemGuid) // cheating check 2 return; eqSet.Items[i] = itemGuid.GetCounter(); @@ -1297,9 +1297,9 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data) recv_data >> itemGuid.ReadAsPacked(); recv_data >> srcbag >> srcslot; - sLog.outDebug("Item " I64FMT ": srcbag %u, srcslot %u", itemGuid.GetRawValue(), srcbag, srcslot); + sLog.outDebug("Item (%s): srcbag %u, srcslot %u", itemGuid.GetString().c_str(), srcbag, srcslot); - Item *item = _player->GetItemByGuid(itemGuid.GetRawValue()); + Item *item = _player->GetItemByGuid(itemGuid); uint16 dstpos = i | (INVENTORY_SLOT_BAG_0 << 8); diff --git a/src/game/CombatHandler.cpp b/src/game/CombatHandler.cpp index 4daeb2e87..ab821bffc 100644 --- a/src/game/CombatHandler.cpp +++ b/src/game/CombatHandler.cpp @@ -31,7 +31,7 @@ void WorldSession::HandleAttackSwingOpcode( WorldPacket & recv_data ) DEBUG_LOG("WORLD: Recvd CMSG_ATTACKSWING Message %s", guid.GetString().c_str()); - Unit *pEnemy = ObjectAccessor::GetUnit(*_player, guid.GetRawValue()); + Unit *pEnemy = ObjectAccessor::GetUnit(*_player, guid); if(!pEnemy) { diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 852086125..2ab304e0b 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -148,7 +148,7 @@ Creature::~Creature() void Creature::AddToWorld() { ///- Register the creature for guid lookup - if(!IsInWorld() && GetGUIDHigh() == HIGHGUID_UNIT) + if(!IsInWorld() && GetObjectGuid().GetHigh() == HIGHGUID_UNIT) GetMap()->GetObjectsStore().insert(GetGUID(), (Creature*)this); Unit::AddToWorld(); @@ -157,7 +157,7 @@ void Creature::AddToWorld() void Creature::RemoveFromWorld() { ///- Remove the creature from the accessor - if(IsInWorld() && GetGUIDHigh() == HIGHGUID_UNIT) + if(IsInWorld() && GetObjectGuid().GetHigh() == HIGHGUID_UNIT) GetMap()->GetObjectsStore().erase(GetGUID(), (Creature*)NULL); Unit::RemoveFromWorld(); diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index 9a06194fe..a709db5ad 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -746,7 +746,7 @@ void Guild::Roster(WorldSession *session /*= NULL*/) } else { - data << uint64(ObjectGuid(HIGHGUID_PLAYER, itr->first).GetRawValue()); + data << ObjectGuid(HIGHGUID_PLAYER, itr->first); data << uint8(0); data << itr->second.Name; data << uint32(itr->second.RankId); diff --git a/src/game/ItemHandler.cpp b/src/game/ItemHandler.cpp index 2e454418c..19b2c13cc 100644 --- a/src/game/ItemHandler.cpp +++ b/src/game/ItemHandler.cpp @@ -470,12 +470,11 @@ void WorldSession::HandlePageQuerySkippedOpcode( WorldPacket & recv_data ) sLog.outDebug( "WORLD: Received CMSG_PAGE_TEXT_QUERY" ); uint32 itemid; - uint64 guid; + ObjectGuid guid; recv_data >> itemid >> guid; - sLog.outDetail( "Packet Info: itemid: %u guidlow: %u guidentry: %u guidhigh: %u", - itemid, GUID_LOPART(guid), GUID_ENPART(guid), GUID_HIPART(guid)); + sLog.outDetail( "Packet Info: itemid: %u guid: %s", itemid, guid.GetString().c_str()); } void WorldSession::HandleSellItemOpcode( WorldPacket & recv_data ) diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index 2bd1b867a..87fdfe468 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -2383,7 +2383,7 @@ bool ChatHandler::HandleDelTicketCommand(const char *args) sTicketMgr.Delete(guid); //notify player - if(Player* pl = sObjectMgr.GetPlayer(MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER))) + if(Player* pl = sObjectMgr.GetPlayer(ObjectGuid(HIGHGUID_PLAYER, guid))) { pl->GetSession()->SendGMTicketGetTicket(0x0A, 0); PSendSysMessage(LANG_COMMAND_TICKETPLAYERDEL, GetNameLink(pl).c_str()); diff --git a/src/game/LootHandler.cpp b/src/game/LootHandler.cpp index d090e0aca..944e9e821 100644 --- a/src/game/LootHandler.cpp +++ b/src/game/LootHandler.cpp @@ -466,7 +466,8 @@ void WorldSession::DoLootRelease(ObjectGuid lguid) void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data ) { uint8 slotid; - uint64 lootguid, target_playerguid; + ObjectGuid lootguid; + ObjectGuid target_playerguid; recv_data >> lootguid >> slotid >> target_playerguid; @@ -476,18 +477,18 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data ) return; } - Player *target = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, target_playerguid)); + Player *target = ObjectAccessor::FindPlayer(target_playerguid); if(!target) return; - sLog.outDebug("WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = [%s].", target->GetName()); + sLog.outDebug("WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = %s [%s].", target_playerguid.GetString().c_str(), target->GetName()); - if(_player->GetLootGUID() != lootguid) + if(_player->GetLootGUID() != lootguid.GetRawValue()) return; Loot *pLoot = NULL; - if(IS_CREATURE_GUID(GetPlayer()->GetLootGUID())) + if(lootguid.IsCreature()) { Creature *pCreature = GetPlayer()->GetMap()->GetCreature(lootguid); if(!pCreature) @@ -495,7 +496,7 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data ) pLoot = &pCreature->loot; } - else if(IS_GAMEOBJECT_GUID(GetPlayer()->GetLootGUID())) + else if(lootguid.IsGameobject()) { GameObject *pGO = GetPlayer()->GetMap()->GetGameObject(lootguid); if(!pGO) @@ -503,8 +504,7 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data ) pLoot = &pGO->loot; } - - if(!pLoot) + else return; if (slotid > pLoot->items.size()) diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index 9badb4b86..815c284ac 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -1555,7 +1555,7 @@ void WorldSession::HandleQueryInspectAchievements( WorldPacket & recv_data ) recv_data >> guid.ReadAsPacked(); - if(Player *player = sObjectMgr.GetPlayer(guid.GetRawValue())) + if(Player *player = sObjectMgr.GetPlayer(guid)) player->GetAchievementMgr().SendRespondInspectAchievements(_player); } diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index b1a546c75..0cb045cd9 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -178,7 +178,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data) uint32 flags, time; recv_data >> flags >> time; - DEBUG_LOG("Guid " UI64FMTD, guid.GetRawValue()); + DEBUG_LOG("Guid: %s", guid.GetString().c_str()); DEBUG_LOG("Flags %u, time %u", flags, time/IN_MILISECONDS); Unit *mover = _player->m_mover; @@ -187,7 +187,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data) if(!plMover || !plMover->IsBeingTeleportedNear()) return; - if(guid.GetRawValue() != plMover->GetGUID()) + if(guid != plMover->GetObjectGuid()) return; plMover->SetSemaphoreTeleportNear(false); @@ -373,7 +373,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data) recv_data >> newspeed; // now can skip not our packet - if(_player->GetGUID() != guid.GetRawValue()) + if(_player->GetObjectGuid() != guid) { recv_data.rpos(recv_data.wpos()); // prevent warnings spam return; @@ -455,7 +455,7 @@ void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data) recv_data >> old_mover_guid.ReadAsPacked(); recv_data >> mi; - if(_player->m_mover->GetGUID() == old_mover_guid.GetRawValue()) + if(_player->m_mover->GetObjectGuid() == old_mover_guid) { sLog.outError("HandleMoveNotActiveMover: incorrect mover guid: mover is " I64FMT " and should be " I64FMT " instead of " UI64FMTD, _player->m_mover->GetGUID(), _player->GetGUID(), old_mover_guid.GetRawValue()); recv_data.rpos(recv_data.wpos()); // prevent warnings spam diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp index ffb3752a5..5519f22b0 100644 --- a/src/game/NPCHandler.cpp +++ b/src/game/NPCHandler.cpp @@ -288,7 +288,7 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data ) uint32 gossipListId; uint32 menuId; - uint64 guid; + ObjectGuid guid; std::string code = ""; recv_data >> guid >> menuId >> gossipListId; @@ -305,13 +305,13 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data ) GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH); // can vehicle have gossip? If so, need check for this also. - if (IS_CREATURE_OR_PET_GUID(guid)) + if (guid.IsCreatureOrPet()) { Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE); if (!pCreature) { - sLog.outDebug("WORLD: HandleGossipSelectOptionOpcode - Creature (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid))); + sLog.outDebug("WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with it.", guid.GetString().c_str()); return; } @@ -326,13 +326,13 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data ) _player->OnGossipSelect(pCreature, gossipListId, menuId); } } - else if (IS_GAMEOBJECT_GUID(guid)) + else if (guid.IsGameobject()) { GameObject *pGo = GetPlayer()->GetGameObjectIfCanInteractWith(guid); if (!pGo) { - sLog.outDebug("WORLD: HandleGossipSelectOptionOpcode - GameObject (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid))); + sLog.outDebug("WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with it.", guid.GetString().c_str()); return; } diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 9ec6a5b7c..1c5a12f49 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -486,7 +486,7 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 updateFlags) const case TYPEID_GAMEOBJECT: case TYPEID_DYNAMICOBJECT: case TYPEID_CORPSE: - *data << uint32(GetGUIDHigh()); // GetGUIDHigh() + *data << uint32(GetObjectGuid().GetHigh()); // GetGUIDHigh() break; case TYPEID_UNIT: *data << uint32(0x0000000B); // unk, can be 0xB or 0xC diff --git a/src/game/Object.h b/src/game/Object.h index dec9fea8b..3b805df93 100644 --- a/src/game/Object.h +++ b/src/game/Object.h @@ -108,10 +108,10 @@ class MANGOS_DLL_SPEC Object m_inWorld = false; } + ObjectGuid const& GetObjectGuid() const { return *reinterpret_cast(&GetUInt64Value(0)); } + const uint64& GetGUID() const { return GetUInt64Value(0); } uint32 GetGUIDLow() const { return GUID_LOPART(GetUInt64Value(0)); } - uint32 GetGUIDMid() const { return GUID_ENPART(GetUInt64Value(0)); } - uint32 GetGUIDHigh() const { return GUID_HIPART(GetUInt64Value(0)); } PackedGuid const& GetPackGUID() const { return m_PackGUID; } uint32 GetEntry() const { return GetUInt32Value(OBJECT_FIELD_ENTRY); } void SetEntry(uint32 entry) { SetUInt32Value(OBJECT_FIELD_ENTRY, entry); } diff --git a/src/game/ObjectGuid.h b/src/game/ObjectGuid.h index ed649af37..99cd88a40 100644 --- a/src/game/ObjectGuid.h +++ b/src/game/ObjectGuid.h @@ -71,9 +71,8 @@ enum HighGuid //*** Must be replaced by ObjectGuid use *** #define IS_CREATURE_GUID(Guid) ( GUID_HIPART(Guid) == HIGHGUID_UNIT ) #define IS_PET_GUID(Guid) ( GUID_HIPART(Guid) == HIGHGUID_PET ) -#define IS_CREATURE_OR_PET_GUID(Guid)( IS_CREATURE_GUID(Guid) || IS_PET_GUID(Guid) ) #define IS_PLAYER_GUID(Guid) ( GUID_HIPART(Guid) == HIGHGUID_PLAYER && Guid!=0 ) -#define IS_UNIT_GUID(Guid) ( IS_CREATURE_OR_PET_GUID(Guid) || IS_PLAYER_GUID(Guid) ) +#define IS_UNIT_GUID(Guid) ( IS_CREATURE_GUID(Guid) || IS_PET_GUID(Guid) || IS_PLAYER_GUID(Guid) ) // special case for empty guid need check #define IS_GAMEOBJECT_GUID(Guid) ( GUID_HIPART(Guid) == HIGHGUID_GAMEOBJECT ) #define IS_MO_TRANSPORT(Guid) ( GUID_HIPART(Guid) == HIGHGUID_MO_TRANSPORT ) @@ -86,8 +85,6 @@ enum HighGuid #define GUID_HIPART(x) (uint32)((uint64(x) >> 48) & 0x0000FFFF) // We have different low and middle part size for different guid types -#define _GUID_ENPART_2(x) 0 -#define _GUID_ENPART_3(x) (uint32)((uint64(x) >> 24) & UI64LIT(0x0000000000FFFFFF)) #define _GUID_LOPART_2(x) (uint32)(uint64(x) & UI64LIT(0x00000000FFFFFFFF)) #define _GUID_LOPART_3(x) (uint32)(uint64(x) & UI64LIT(0x0000000000FFFFFF)) @@ -111,7 +108,6 @@ inline bool IsGuidHaveEnPart(uint64 const& guid) } } -#define GUID_ENPART(x) (IsGuidHaveEnPart(x) ? _GUID_ENPART_3(x) : _GUID_ENPART_2(x)) #define GUID_LOPART(x) (IsGuidHaveEnPart(x) ? _GUID_LOPART_3(x) : _GUID_LOPART_2(x)) //*** Must be replaced by ObjectGuid use END *** @@ -197,6 +193,8 @@ class ObjectGuid TypeID GetTypeId() const { return GetTypeId(GetHigh()); } + bool operator== (ObjectGuid const& guid) const { return GetRawValue() == guid.GetRawValue(); } + bool operator!= (ObjectGuid const& guid) const { return GetRawValue() != guid.GetRawValue(); } bool operator< (ObjectGuid const& guid) const { return GetRawValue() < guid.GetRawValue(); } public: // accessors - for debug diff --git a/src/game/ObjectMgr.h b/src/game/ObjectMgr.h index c16b3d73b..8df515bc4 100644 --- a/src/game/ObjectMgr.h +++ b/src/game/ObjectMgr.h @@ -420,7 +420,7 @@ class ObjectMgr typedef std::vector ScriptNameMap; Player* GetPlayer(const char* name) const { return ObjectAccessor::FindPlayerByName(name);} - Player* GetPlayer(uint64 guid) const { return ObjectAccessor::FindPlayer(guid); } + Player* GetPlayer(ObjectGuid guid) const { return ObjectAccessor::FindPlayer(guid); } static GameObjectInfo const *GetGameObjectInfo(uint32 id) { return sGOStorage.LookupEntry(id); } diff --git a/src/game/Player.cpp b/src/game/Player.cpp index a24ce900a..cffe86ef1 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -2138,10 +2138,10 @@ void Player::RegenerateHealth(uint32 diff) ModifyHealth(int32(addvalue)); } -Creature* Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask) +Creature* Player::GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask) { - // unit checks - if (!guid || !IsInWorld() || isInFlight()) + // some basic checks + if (guid.IsEmpty() || !IsInWorld() || isInFlight()) return NULL; // exist (we need look pets also for some interaction (quest/etc) @@ -2188,8 +2188,12 @@ Creature* Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask) return unit; } -GameObject* Player::GetGameObjectIfCanInteractWith(uint64 guid, uint32 gameobject_type) const +GameObject* Player::GetGameObjectIfCanInteractWith(ObjectGuid guid, uint32 gameobject_type) const { + // some basic checks + if (guid.IsEmpty() || !IsInWorld() || isInFlight()) + return NULL; + if (GameObject *go = GetMap()->GetGameObject(guid)) { if (uint32(go->GetGoType()) == gameobject_type || gameobject_type == MAX_GAMEOBJECT_TYPE) @@ -8701,26 +8705,26 @@ Item* Player::GetItemByGuid(ObjectGuid guid) const { for(int i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; ++i) if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) - if (pItem->GetGUID() == guid.GetRawValue()) + if (pItem->GetObjectGuid() == guid) return pItem; for(int i = KEYRING_SLOT_START; i < CURRENCYTOKEN_SLOT_END; ++i) if (Item *pItem = GetItemByPos(INVENTORY_SLOT_BAG_0, i)) - if (pItem->GetGUID() == guid.GetRawValue()) + if (pItem->GetObjectGuid() == guid) return pItem; for(int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i) if (Bag *pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0, i)) for(uint32 j = 0; j < pBag->GetBagSize(); ++j) if (Item* pItem = pBag->GetItemByPos(j)) - if (pItem->GetGUID() == guid.GetRawValue()) + if (pItem->GetObjectGuid() == guid) return pItem; for(int i = BANK_SLOT_BAG_START; i < BANK_SLOT_BAG_END; ++i) if (Bag *pBag = (Bag*)GetItemByPos(INVENTORY_SLOT_BAG_0, i)) for(uint32 j = 0; j < pBag->GetBagSize(); ++j) if (Item* pItem = pBag->GetItemByPos(j)) - if (pItem->GetGUID() == guid.GetRawValue()) + if (pItem->GetObjectGuid() == guid) return pItem; return NULL; @@ -21713,13 +21717,13 @@ Object* Player::GetObjectByTypeMask(ObjectGuid guid, TypeMask typemask) { case HIGHGUID_ITEM: if (typemask & TYPEMASK_ITEM) - return GetItemByGuid(guid.GetRawValue()); + return GetItemByGuid(guid); break; case HIGHGUID_PLAYER: - if (GetGUID()==guid.GetRawValue()) + if (GetObjectGuid()==guid) return this; if ((typemask & TYPEMASK_PLAYER) && IsInWorld()) - return ObjectAccessor::FindPlayer(guid.GetRawValue()); + return ObjectAccessor::FindPlayer(guid); break; case HIGHGUID_GAMEOBJECT: if ((typemask & TYPEMASK_GAMEOBJECT) && IsInWorld()) diff --git a/src/game/Player.h b/src/game/Player.h index 538fae841..e1bd8a22c 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1048,8 +1048,8 @@ class MANGOS_DLL_SPEC Player : public Unit void SendTransferAborted(uint32 mapid, uint8 reason, uint8 arg = 0); void SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint32 time); - Creature* GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask); - GameObject* GetGameObjectIfCanInteractWith(uint64 guid, uint32 gameobject_type = MAX_GAMEOBJECT_TYPE) const; + Creature* GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask); + GameObject* GetGameObjectIfCanInteractWith(ObjectGuid guid, uint32 gameobject_type = MAX_GAMEOBJECT_TYPE) const; void UpdateVisibilityForPlayer(); diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 9e77eec3e..d44df946a 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -183,9 +183,9 @@ void SpellCastTargets::setCorpseTarget(Corpse* corpse) void SpellCastTargets::Update(Unit* caster) { - m_GOTarget = !m_GOTargetGUID.IsEmpty() ? caster->GetMap()->GetGameObject(m_GOTargetGUID.GetRawValue()) : NULL; + m_GOTarget = !m_GOTargetGUID.IsEmpty() ? caster->GetMap()->GetGameObject(m_GOTargetGUID) : NULL; m_unitTarget = !m_unitTargetGUID.IsEmpty() ? - ( m_unitTargetGUID.GetRawValue() == caster->GetGUID() ? caster : ObjectAccessor::GetUnit(*caster, m_unitTargetGUID.GetRawValue()) ) : + ( m_unitTargetGUID == caster->GetObjectGuid() ? caster : ObjectAccessor::GetUnit(*caster, m_unitTargetGUID) ) : NULL; m_itemTarget = NULL; @@ -3636,7 +3636,7 @@ void Spell::TakeCastItem() { // This code is to avoid a crash // I'm not sure, if this is really an error, but I guess every item needs a prototype - sLog.outError("Cast item has no item prototype highId=%d, lowId=%d",m_CastItem->GetGUIDHigh(), m_CastItem->GetGUIDLow()); + sLog.outError("Cast item (%s) has no item prototype", m_CastItem->GetObjectGuid().GetString().c_str()); return; } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 2538c2c56..d84332d47 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -12783,7 +12783,7 @@ void Unit::ClearComboPointHolders() { uint32 lowguid = *m_ComboPointHolders.begin(); - Player* plr = sObjectMgr.GetPlayer(MAKE_NEW_GUID(lowguid, 0, HIGHGUID_PLAYER)); + Player* plr = sObjectMgr.GetPlayer(ObjectGuid(HIGHGUID_PLAYER, lowguid)); if(plr && plr->GetComboTarget()==GetGUID()) // recheck for safe plr->ClearComboPoints(); // remove also guid from m_ComboPointHolders; else diff --git a/src/game/WorldSession.h b/src/game/WorldSession.h index 4a755ade5..caa794a25 100644 --- a/src/game/WorldSession.h +++ b/src/game/WorldSession.h @@ -30,6 +30,7 @@ struct ItemPrototype; struct AuctionEntry; struct DeclinedName; +class ObjectGuid; class Creature; class Item; class Object; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0f21bef72..dd1a58ef7 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9579" + #define REVISION_NR "9580" #endif // __REVISION_NR_H__