diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp index 7e6ce8de5..d69493f32 100644 --- a/src/game/AchievementMgr.cpp +++ b/src/game/AchievementMgr.cpp @@ -56,9 +56,9 @@ namespace MaNGOS data << uint8(i_msgtype); data << uint32(LANG_UNIVERSAL); - data << uint64(i_player.GetGUID()); + data << i_player.GetObjectGuid(); data << uint32(5); - data << uint64(i_player.GetGUID()); + data << i_player.GetObjectGuid(); data << uint32(strlen(text)+1); data << text; data << uint8(0); @@ -639,7 +639,7 @@ void AchievementMgr::SendAchievementEarned(AchievementEntry const* achievement) // broadcast realm first reached WorldPacket data(SMSG_SERVER_FIRST_ACHIEVEMENT, strlen(GetPlayer()->GetName())+1+8+4+4); data << GetPlayer()->GetName(); - data << uint64(GetPlayer()->GetGUID()); + data << GetPlayer()->GetObjectGuid(); data << uint32(achievement->ID); data << uint32(0); // 1=link supplied string as player name, 0=display plain string sWorld.SendGlobalMessage(&data); diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp index f7e372642..000a54d14 100644 --- a/src/game/AuctionHouseMgr.cpp +++ b/src/game/AuctionHouseMgr.cpp @@ -687,13 +687,13 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const data << uint32(pItem->GetCount()); //item->count data << uint32(pItem->GetSpellCharges()); //item->charge FFFFFFF data << uint32(0); //Unknown - data << uint64(owner); //Auction->owner + data << ObjectGuid(HIGHGUID_PLAYER, owner); //Auction->owner data << uint32(startbid); //Auction->startbid (not sure if useful) data << uint32(bid ? GetAuctionOutBid() : 0); //minimal outbid data << uint32(buyout); //auction->buyout data << uint32((expire_time-time(NULL))*IN_MILLISECONDS);//time left - data << uint64(bidder) ; //auction->bidder current + data << ObjectGuid(HIGHGUID_PLAYER, bidder); //auction->bidder current data << uint32(bid); //current bid return true; } diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp index 6c98e04b8..d2c5e86ac 100644 --- a/src/game/BattleGroundMgr.cpp +++ b/src/game/BattleGroundMgr.cpp @@ -1396,7 +1396,7 @@ void BattleGroundMgr::BuildPlayerLeftBattleGroundPacket(WorldPacket *data, const void BattleGroundMgr::BuildPlayerJoinedBattleGroundPacket(WorldPacket *data, Player *plr) { data->Initialize(SMSG_BATTLEGROUND_PLAYER_JOINED, 8); - *data << uint64(plr->GetGUID()); + *data << plr->GetObjectGuid(); } BattleGround * BattleGroundMgr::GetBattleGroundThroughClientInstance(uint32 instanceId, BattleGroundTypeId bgTypeId) diff --git a/src/game/Chat.cpp b/src/game/Chat.cpp index f8917fe64..f89278dc4 100644 --- a/src/game/Chat.cpp +++ b/src/game/Chat.cpp @@ -1948,7 +1948,7 @@ void ChatHandler::FillMessageData( WorldPacket *data, WorldSession* session, uin case CHAT_MSG_RAID_BOSS_EMOTE: case CHAT_MSG_BATTLENET: { - *data << uint64(speaker->GetGUID()); + *data << speaker->GetObjectGuid(); *data << uint32(0); // 2.1.0 *data << uint32(strlen(speaker->GetName()) + 1); *data << speaker->GetName(); diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 4157d3a19..ed675c4b2 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1649,7 +1649,7 @@ void Creature::SendAIReaction(AiReaction reactionType) { WorldPacket data(SMSG_AI_REACTION, 12); - data << uint64(GetGUID()); + data << GetObjectGuid(); data << uint32(reactionType); ((WorldObject*)this)->SendMessageToSet(&data, true); diff --git a/src/game/Group.cpp b/src/game/Group.cpp index 14d683b72..3fb9dc26a 100644 --- a/src/game/Group.cpp +++ b/src/game/Group.cpp @@ -654,7 +654,7 @@ void Group::MasterLoot(Creature *creature, Loot* loot) if (looter->IsWithinDist(creature, sWorld.getConfig(CONFIG_FLOAT_GROUP_XP_DISTANCE), false)) { - data << uint64(looter->GetGUID()); + data << looter->GetObjectGuid(); ++real_count; } } diff --git a/src/game/Group.h b/src/game/Group.h index 2582caed6..732e7fe18 100644 --- a/src/game/Group.h +++ b/src/game/Group.h @@ -234,7 +234,7 @@ class MANGOS_DLL_SPEC Group // member manipulation methods bool IsMember(ObjectGuid guid) const { return _getMemberCSlot(guid) != m_memberSlots.end(); } bool IsLeader(ObjectGuid guid) const { return GetLeaderGuid() == guid; } - ObjectGuid GetMemberGUID(const std::string& name) + ObjectGuid GetMemberGuid(const std::string& name) { for(member_citerator itr = m_memberSlots.begin(); itr != m_memberSlots.end(); ++itr) if (itr->name == name) diff --git a/src/game/GroupHandler.cpp b/src/game/GroupHandler.cpp index 04da05c62..a8ef69542 100644 --- a/src/game/GroupHandler.cpp +++ b/src/game/GroupHandler.cpp @@ -297,7 +297,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data) if (!grp) return; - ObjectGuid guid = grp->GetMemberGUID(membername); + ObjectGuid guid = grp->GetMemberGuid(membername); if (!guid.IsEmpty()) { Player::RemoveFromGroup(grp, guid); @@ -426,7 +426,7 @@ void WorldSession::HandleMinimapPingOpcode(WorldPacket& recv_data) // everything is fine, do it WorldPacket data(MSG_MINIMAP_PING, (8+4+4)); - data << uint64(GetPlayer()->GetGUID()); + data << GetPlayer()->GetObjectGuid(); data << float(x); data << float(y); GetPlayer()->GetGroup()->BroadcastPacket(&data, true, -1, GetPlayer()->GetObjectGuid()); @@ -452,7 +452,7 @@ void WorldSession::HandleRandomRollOpcode(WorldPacket& recv_data) data << uint32(minimum); data << uint32(maximum); data << uint32(roll); - data << uint64(GetPlayer()->GetGUID()); + data << GetPlayer()->GetObjectGuid(); if(GetPlayer()->GetGroup()) GetPlayer()->GetGroup()->BroadcastPacket(&data, false); else @@ -630,7 +630,7 @@ void WorldSession::HandleRaidReadyCheckOpcode( WorldPacket & recv_data ) // everything is fine, do it WorldPacket data(MSG_RAID_READY_CHECK_CONFIRM, 9); - data << uint64(GetPlayer()->GetGUID()); + data << GetPlayer()->GetObjectGuid(); data << uint8(state); group->BroadcastReadyCheck(&data); } @@ -721,12 +721,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke Pet *pet = player->GetPet(); if (mask & GROUP_UPDATE_FLAG_PET_GUID) - { - if(pet) - *data << uint64(pet->GetGUID()); - else - *data << uint64(0); - } + *data << (pet ? pet->GetObjectGuid() : ObjectGuid()); if (mask & GROUP_UPDATE_FLAG_PET_NAME) { @@ -863,7 +858,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data ) if(pet) { Powers petpowertype = pet->getPowerType(); - data << uint64(pet->GetGUID()); // GROUP_UPDATE_FLAG_PET_GUID + data << pet->GetObjectGuid(); // GROUP_UPDATE_FLAG_PET_GUID data << pet->GetName(); // GROUP_UPDATE_FLAG_PET_NAME data << uint16(pet->GetDisplayId()); // GROUP_UPDATE_FLAG_PET_MODEL_ID data << uint32(pet->GetHealth()); // GROUP_UPDATE_FLAG_PET_CUR_HP diff --git a/src/game/Guild.cpp b/src/game/Guild.cpp index 764725d28..a8ad04f4e 100644 --- a/src/game/Guild.cpp +++ b/src/game/Guild.cpp @@ -733,7 +733,7 @@ void Guild::Roster(WorldSession *session /*= NULL*/) { if (Player *pl = ObjectAccessor::FindPlayer(ObjectGuid(HIGHGUID_PLAYER, itr->first))) { - data << uint64(pl->GetGUID()); + data << pl->GetObjectGuid(); data << uint8(1); data << pl->GetName(); data << uint32(itr->second.RankId); @@ -838,10 +838,10 @@ void Guild::DisplayGuildEventLog(WorldSession *session) // Event type data << uint8(itr->EventType); // Player 1 - data << uint64(itr->PlayerGuid1); + data << ObjectGuid(HIGHGUID_PLAYER, itr->PlayerGuid1); // Player 2 not for left/join guild events if (itr->EventType != GUILD_EVENT_LOG_JOIN_GUILD && itr->EventType != GUILD_EVENT_LOG_LEAVE_GUILD) - data << uint64(itr->PlayerGuid2); + data << ObjectGuid(HIGHGUID_PLAYER, itr->PlayerGuid2); // New Rank - only for promote/demote guild events if (itr->EventType == GUILD_EVENT_LOG_PROMOTE_PLAYER || itr->EventType == GUILD_EVENT_LOG_DEMOTE_PLAYER) data << uint8(itr->NewRank); diff --git a/src/game/LFGHandler.cpp b/src/game/LFGHandler.cpp index 4ecab4768..6beccec99 100644 --- a/src/game/LFGHandler.cpp +++ b/src/game/LFGHandler.cpp @@ -339,7 +339,7 @@ void WorldSession::SendLfgResult(uint32 type, uint32 entry, uint8 lfg_type) ++number; - data << uint64(plr->GetGUID()); // guid + data << plr->GetObjectGuid(); // guid uint32 flags = 0x1FF; data << uint32(flags); // flags diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index 41c6a8ee8..6f7e3e51f 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -895,7 +895,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data) dest.resize(destSize); WorldPacket data(SMSG_UPDATE_ACCOUNT_DATA, 8+4+4+4+destSize); - data << uint64(_player ? _player->GetGUID() : 0); // player guid + data << (_player ? _player->GetObjectGuid() : ObjectGuid());// player guid data << uint32(type); // type (0-7) data << uint32(adata->Time); // unix time data << uint32(size); // decompressed length @@ -1118,7 +1118,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data) } WorldPacket data(MSG_INSPECT_HONOR_STATS, 8+1+4*4); - data << uint64(player->GetGUID()); + data << player->GetObjectGuid(); data << uint8(player->GetUInt32Value(PLAYER_FIELD_HONOR_CURRENCY)); data << uint32(player->GetUInt32Value(PLAYER_FIELD_KILLS)); data << uint32(player->GetUInt32Value(PLAYER_FIELD_TODAY_CONTRIBUTION)); diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index b02645f31..c2434039c 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -500,7 +500,7 @@ void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvdata*/) //DEBUG_LOG("WORLD: Recvd CMSG_MOUNTSPECIAL_ANIM"); WorldPacket data(SMSG_MOUNTSPECIAL_ANIM, 8); - data << uint64(GetPlayer()->GetGUID()); + data << GetPlayer()->GetObjectGuid(); GetPlayer()->SendMessageToSet(&data, false); } diff --git a/src/game/NPCHandler.cpp b/src/game/NPCHandler.cpp index 181c2a24c..4c0dfeb9e 100644 --- a/src/game/NPCHandler.cpp +++ b/src/game/NPCHandler.cpp @@ -246,7 +246,7 @@ void WorldSession::HandleTrainerBuySpellOpcode( WorldPacket & recv_data ) SendPacket(&data); data.Initialize(SMSG_PLAY_SPELL_IMPACT, 12); // visual effect on player - data << uint64(_player->GetGUID()); + data << _player->GetObjectGuid(); data << uint32(0x016A); // index from SpellVisualKit.dbc SendPacket(&data); @@ -453,7 +453,7 @@ void WorldSession::SendBindPoint(Creature *npc) npc->CastSpell(_player, 3286, true); // Bind WorldPacket data( SMSG_TRAINER_BUY_SUCCEEDED, (8+4)); - data << uint64(npc->GetGUID()); + data << npc->GetObjectGuid(); data << uint32(3286); // Bind SendPacket( &data ); diff --git a/src/game/Object.cpp b/src/game/Object.cpp index f4a8fa737..22e6517a5 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -240,7 +240,7 @@ void Object::DestroyForPlayer( Player *target, bool anim ) const ASSERT(target); WorldPacket data(SMSG_DESTROY_OBJECT, 8); - data << uint64(GetGUID()); + data << GetObjectGuid(); data << uint8(anim ? 1 : 0); // WotLK (bool), may be despawn animation target->GetSession()->SendPacket(&data); } @@ -1874,7 +1874,7 @@ void WorldObject::PlayDistanceSound( uint32 sound_id, Player* target /*= NULL*/ { WorldPacket data(SMSG_PLAY_OBJECT_SOUND,4+8); data << uint32(sound_id); - data << uint64(GetGUID()); + data << GetObjectGuid(); if (target) target->SendDirectMessage( &data ); else diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index af9d67ae3..1a1ba9a32 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -1987,7 +1987,7 @@ void Pet::ApplyModeFlags(PetModeFlags mode, bool apply) return; WorldPacket data(SMSG_PET_MODE, 12); - data << uint64(GetGUID()); + data << GetObjectGuid(); data << uint32(m_petModeFlags); ((Player*)owner)->GetSession()->SendPacket(&data); } diff --git a/src/game/PetitionsHandler.cpp b/src/game/PetitionsHandler.cpp index 9d73a33d0..f2947cde3 100644 --- a/src/game/PetitionsHandler.cpp +++ b/src/game/PetitionsHandler.cpp @@ -270,7 +270,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data) WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+1+signs*12)); data << uint64(petitionguid); // petition guid - data << uint64(_player->GetGUID()); // owner guid + data << _player->GetObjectGuid(); // owner guid data << uint32(petitionguid_low); // guild guid (in mangos always same as GUID_LOPART(petitionguid) data << uint8(signs); // sign's count @@ -687,7 +687,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data) WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+signs+signs*12)); data << uint64(petitionguid); // petition guid - data << uint64(_player->GetGUID()); // owner guid + data << _player->GetObjectGuid(); // owner guid data << uint32(GUID_LOPART(petitionguid)); // guild guid (in mangos always same as GUID_LOPART(petition guid) data << uint8(signs); // sign's count diff --git a/src/game/Player.cpp b/src/game/Player.cpp index ae4729286..0572c21bc 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -958,7 +958,7 @@ uint32 Player::EnvironmentalDamage(EnviromentalDamage type, uint32 damage) DealDamageMods(this,damage,&absorb); WorldPacket data(SMSG_ENVIRONMENTALDAMAGELOG, (21)); - data << uint64(GetGUID()); + data << GetObjectGuid(); data << uint8(type!=DAMAGE_FALL_TO_VOID ? type : DAMAGE_FALL); data << uint32(damage); data << uint32(absorb); @@ -1177,7 +1177,7 @@ void Player::SetDrunkValue(uint16 newDrunkenValue, uint32 itemId) return; WorldPacket data(SMSG_CROSSED_INEBRIATION_THRESHOLD, (8+4+4)); - data << uint64(GetGUID()); + data << GetObjectGuid(); data << uint32(newDrunkenState); data << uint32(itemId); @@ -2500,7 +2500,7 @@ void Player::RemoveFromGroup(Group* group, ObjectGuid guid) void Player::SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 RestXP) { WorldPacket data(SMSG_LOG_XPGAIN, 21); - data << uint64(victim ? victim->GetGUID() : 0); // guid + data << (victim ? victim->GetObjectGuid() : ObjectGuid());// guid data << uint32(GivenXP+RestXP); // given experience data << uint8(victim ? 0 : 1); // 00-kill_xp type, 01-non_kill_xp type if(victim) @@ -11044,7 +11044,7 @@ Item* Player::EquipItem( uint16 pos, Item *pItem, bool update ) m_weaponChangeTimer = spellProto->StartRecoveryTime; WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+4); - data << uint64(GetGUID()); + data << GetObjectGuid(); data << uint8(1); data << uint32(cooldownSpell); data << uint32(0); @@ -12083,8 +12083,8 @@ void Player::SendEquipError( uint8 msg, Item* pItem, Item *pItem2, uint32 itemid if (msg != EQUIP_ERR_OK) { - data << uint64(pItem ? pItem->GetGUID() : 0); - data << uint64(pItem2 ? pItem2->GetGUID() : 0); + data << (pItem ? pItem->GetObjectGuid() : ObjectGuid()); + data << (pItem2 ? pItem2->GetObjectGuid() : ObjectGuid()); data << uint8(0); // bag type subclass, used with EQUIP_ERR_EVENT_AUTOEQUIP_BIND_CONFIRM and EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG2 switch(msg) @@ -12122,7 +12122,7 @@ void Player::SendBuyError( uint8 msg, Creature* pCreature, uint32 item, uint32 p { DEBUG_LOG( "WORLD: Sent SMSG_BUY_FAILED" ); WorldPacket data( SMSG_BUY_FAILED, (8+4+4+1) ); - data << uint64(pCreature ? pCreature->GetGUID() : 0); + data << (pCreature ? pCreature->GetObjectGuid() : ObjectGuid()); data << uint32(item); if (param > 0) data << uint32(param); @@ -12134,7 +12134,7 @@ void Player::SendSellError( uint8 msg, Creature* pCreature, uint64 guid, uint32 { DEBUG_LOG( "WORLD: Sent SMSG_SELL_ITEM" ); WorldPacket data( SMSG_SELL_ITEM,(8+8+(param?4:0)+1)); // last check 2.0.10 - data << uint64(pCreature ? pCreature->GetGUID() : 0); + data << (pCreature ? pCreature->GetObjectGuid() : ObjectGuid()); data << uint64(guid); if (param > 0) data << uint32(param); @@ -12671,7 +12671,7 @@ void Player::SendNewItem(Item *item, uint32 count, bool received, bool created, // last check 2.0.10 WorldPacket data( SMSG_ITEM_PUSH_RESULT, (8+4+4+4+1+4+4+4+4+4) ); - data << uint64(GetGUID()); // player GUID + data << GetObjectGuid(); // player GUID data << uint32(received); // 0=looted, 1=from npc data << uint32(created); // 0=received, 1=created data << uint32(1); // IsShowChatMessage @@ -14807,7 +14807,7 @@ void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver) WorldPacket data(SMSG_QUEST_CONFIRM_ACCEPT, (4 + strTitle.size() + 8)); data << uint32(pQuest->GetQuestId()); data << strTitle; - data << uint64(GetGUID()); + data << GetObjectGuid(); pReceiver->GetSession()->SendPacket(&data); DEBUG_LOG("WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT"); @@ -14819,7 +14819,7 @@ void Player::SendPushToPartyResponse( Player *pPlayer, uint32 msg ) if( pPlayer ) { WorldPacket data( MSG_QUEST_PUSH_RESULT, (8+1) ); - data << uint64(pPlayer->GetGUID()); + data << pPlayer->GetObjectGuid(); data << uint8(msg); // valid values: 0-8 GetSession()->SendPacket( &data ); DEBUG_LOG("WORLD: Sent MSG_QUEST_PUSH_RESULT"); @@ -17799,7 +17799,7 @@ void Player::PetSpellInitialize() CharmInfo *charmInfo = pet->GetCharmInfo(); WorldPacket data(SMSG_PET_SPELLS, 8+2+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+1); - data << uint64(pet->GetGUID()); + data << pet->GetObjectGuid(); data << uint16(pet->GetCreatureInfo()->family); // creature family (required for pet talents) data << uint32(0); data << uint8(charmInfo->GetReactState()) << uint8(charmInfo->GetCommandState()) << uint16(0); @@ -17884,7 +17884,7 @@ void Player::PossessSpellInitialize() } WorldPacket data(SMSG_PET_SPELLS, 8+2+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+1); - data << uint64(charm->GetGUID()); + data << charm->GetObjectGuid(); data << uint16(0); data << uint32(0); data << uint32(0); @@ -17928,7 +17928,7 @@ void Player::CharmSpellInitialize() } WorldPacket data(SMSG_PET_SPELLS, 8+2+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+4*addlist+1); - data << uint64(charm->GetGUID()); + data << charm->GetObjectGuid(); data << uint16(0); data << uint32(0); @@ -17959,7 +17959,7 @@ void Player::CharmSpellInitialize() void Player::RemovePetActionBar() { WorldPacket data(SMSG_PET_SPELLS, 8); - data << uint64(0); + data << ObjectGuid(); SendDirectMessage(&data); } @@ -18456,7 +18456,7 @@ void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs ) { // last check 2.0.10 WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+m_spells.size()*8); - data << uint64(GetGUID()); + data << GetObjectGuid(); data << uint8(0x0); // flags (0x1, 0x2) time_t curTime = time(NULL); for(PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr) @@ -18703,7 +18703,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 uint32 new_count = pCreature->UpdateVendorItemCurrentCount(crItem,pProto->BuyCount * count); WorldPacket data(SMSG_BUY_ITEM, (8+4+4+4)); - data << uint64(pCreature->GetGUID()); + data << pCreature->GetObjectGuid(); data << uint32(vendorslot+1); // numbered from 1 at client data << uint32(crItem->maxcount > 0 ? new_count : 0xFFFFFFFF); data << uint32(count); @@ -18748,7 +18748,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32 uint32 new_count = pCreature->UpdateVendorItemCurrentCount(crItem,pProto->BuyCount * count); WorldPacket data(SMSG_BUY_ITEM, (8+4+4+4)); - data << uint64(pCreature->GetGUID()); + data << pCreature->GetObjectGuid(); data << uint32(vendorslot + 1); // numbered from 1 at client data << uint32(crItem->maxcount > 0 ? new_count : 0xFFFFFFFF); data << uint32(count); @@ -18955,7 +18955,7 @@ void Player::SendCooldownEvent(SpellEntry const *spellInfo, uint32 itemId, Spell // Send activate cooldown timer (possible 0) at client side WorldPacket data(SMSG_COOLDOWN_EVENT, (4+8)); data << uint32(spellInfo->Id); - data << uint64(GetGUID()); + data << GetObjectGuid(); SendDirectMessage(&data); } @@ -20865,7 +20865,7 @@ void Player::EnterVehicle(Vehicle *vehicle) data << vehicle->GetPositionZ(); // z data << vehicle->GetOrientation(); // o // transport part, TODO: load/calculate seat offsets - data << uint64(vehicle->GetGUID()); // transport guid + data << vehicle->GetObjectGuid(); // transport guid data << float(veSeat->m_attachmentOffsetX); // transport offsetX data << float(veSeat->m_attachmentOffsetY); // transport offsetY data << float(veSeat->m_attachmentOffsetZ); // transport offsetZ @@ -20877,7 +20877,7 @@ void Player::EnterVehicle(Vehicle *vehicle) GetSession()->SendPacket(&data); data.Initialize(SMSG_PET_SPELLS, 8+2+4+4+4*MAX_UNIT_ACTION_BAR_INDEX+1+1); - data << uint64(vehicle->GetGUID()); + data << vehicle->GetObjectGuid(); data << uint16(0); data << uint32(0); data << uint32(0x00000101); @@ -22148,7 +22148,7 @@ void Player::SendClearCooldown( uint32 spell_id, Unit* target ) { WorldPacket data(SMSG_CLEAR_COOLDOWN, 4+8); data << uint32(spell_id); - data << uint64(target->GetGUID()); + data << target->GetObjectGuid(); SendDirectMessage(&data); } diff --git a/src/game/QuestHandler.cpp b/src/game/QuestHandler.cpp index c86d049a0..289232f80 100644 --- a/src/game/QuestHandler.cpp +++ b/src/game/QuestHandler.cpp @@ -674,7 +674,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket if (dialogStatus > DIALOG_STATUS_REWARD_REP) dialogStatus = getDialogStatus(_player, questgiver, DIALOG_STATUS_NONE); - data << uint64(questgiver->GetGUID()); + data << questgiver->GetObjectGuid(); data << uint8(dialogStatus); ++count; } @@ -693,7 +693,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket if (dialogStatus > DIALOG_STATUS_REWARD_REP) dialogStatus = getDialogStatus(_player, questgiver, DIALOG_STATUS_NONE); - data << uint64(questgiver->GetGUID()); + data << questgiver->GetObjectGuid(); data << uint8(dialogStatus); ++count; } diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index d2da586c9..5e1e430ab 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3855,7 +3855,7 @@ void Spell::SendResurrectRequest(Player* target) const char* sentName = m_caster->GetTypeId() == TYPEID_PLAYER ? "" : m_caster->GetNameForLocaleIdx(target->GetSession()->GetSessionDbLocaleIndex()); WorldPacket data(SMSG_RESURRECT_REQUEST, (8+4+strlen(sentName)+1+1+1)); - data << uint64(m_caster->GetGUID()); + data << m_caster->GetObjectGuid(); data << uint32(strlen(sentName) + 1); data << sentName; @@ -3871,7 +3871,7 @@ void Spell::SendPlaySpellVisual(uint32 SpellID) return; WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 8 + 4); - data << uint64(m_caster->GetGUID()); + data << m_caster->GetObjectGuid(); data << uint32(SpellID); // spell visual id? ((Player*)m_caster)->GetSession()->SendPacket(&data); } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 5677cdbc8..3ad5b9369 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -904,7 +904,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) if (caster && caster->GetTypeId() == TYPEID_PLAYER) { WorldPacket data(SMSG_SPIRIT_HEALER_CONFIRM, 8); - data << uint64(unitTarget->GetGUID()); + data << unitTarget->GetObjectGuid(); ((Player*)caster)->GetSession()->SendPacket( &data ); } return; @@ -4214,8 +4214,8 @@ void Spell::EffectDispel(SpellEffectIndex eff_idx) { // Failed to dispell WorldPacket data(SMSG_DISPEL_FAILED, 8+8+4+4*fail_list.size()); - data << uint64(m_caster->GetGUID()); // Caster GUID - data << uint64(unitTarget->GetGUID()); // Victim GUID + data << m_caster->GetObjectGuid(); // Caster GUID + data << unitTarget->GetObjectGuid(); // Victim GUID data << uint32(m_spellInfo->Id); // Dispell spell id for (std::list< uint32 >::iterator j = fail_list.begin(); j != fail_list.end(); ++j) data << uint32(*j); // Spell Id @@ -6686,8 +6686,8 @@ void Spell::EffectDuel(SpellEffectIndex eff_idx) // Send request WorldPacket data(SMSG_DUEL_REQUESTED, 8 + 8); - data << uint64(pGameObj->GetGUID()); - data << uint64(caster->GetGUID()); + data << pGameObj->GetObjectGuid(); + data << caster->GetObjectGuid(); caster->GetSession()->SendPacket(&data); target->GetSession()->SendPacket(&data); @@ -6752,7 +6752,7 @@ void Spell::EffectSummonPlayer(SpellEffectIndex /*eff_idx*/) ((Player*)unitTarget)->SetSummonPoint(m_caster->GetMapId(),x,y,z); WorldPacket data(SMSG_SUMMON_REQUEST, 8+4+4); - data << uint64(m_caster->GetGUID()); // summoner guid + data << m_caster->GetObjectGuid(); // summoner guid data << uint32(m_caster->GetZoneId()); // summoner zone data << uint32(MAX_PLAYER_SUMMON_DELAY*IN_MILLISECONDS); // auto decline after msecs ((Player*)unitTarget)->GetSession()->SendPacket(&data); @@ -6883,7 +6883,7 @@ void Spell::DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc) { WorldPacket data(SMSG_TOTEM_CREATED, 1 + 8 + 4 + 4); data << uint8(slot); - data << uint64(pTotem->GetGUID()); + data << pTotem->GetObjectGuid(); data << uint32(duration); data << uint32(m_spellInfo->Id); ((Player*)m_caster)->SendDirectMessage(&data); @@ -7985,7 +7985,7 @@ void Spell::EffectBind(SpellEffectIndex eff_idx) // zone update data.Initialize(SMSG_PLAYERBOUND, 8+4); - data << uint64(player->GetGUID()); + data << player->GetObjectGuid(); data << uint32(area_id); player->SendDirectMessage( &data ); } @@ -8031,7 +8031,7 @@ void Spell::EffectTeachTaxiNode( SpellEffectIndex eff_idx ) player->SendDirectMessage( &data ); data.Initialize( SMSG_TAXINODE_STATUS, 9 ); - data << uint64( m_caster->GetGUID() ); + data << m_caster->GetObjectGuid(); data << uint8( 1 ); player->SendDirectMessage( &data ); } diff --git a/src/game/TaxiHandler.cpp b/src/game/TaxiHandler.cpp index 18eac6b45..86ad5fd44 100644 --- a/src/game/TaxiHandler.cpp +++ b/src/game/TaxiHandler.cpp @@ -103,7 +103,7 @@ void WorldSession::SendTaxiMenu( Creature* unit ) WorldPacket data( SMSG_SHOWTAXINODES, (4+8+4+8*4) ); data << uint32( 1 ); - data << uint64( unit->GetGUID() ); + data << unit->GetObjectGuid(); data << uint32( curloc ); GetPlayer()->m_taxi.AppendTaximaskTo(data,GetPlayer()->isTaxiCheater()); SendPacket( &data ); diff --git a/src/game/TradeHandler.cpp b/src/game/TradeHandler.cpp index 6abb06199..a90ce19c8 100644 --- a/src/game/TradeHandler.cpp +++ b/src/game/TradeHandler.cpp @@ -101,13 +101,13 @@ void WorldSession::SendUpdateTrade(bool trader_state /*= true*/) data << uint32(item->GetCount()); // stack count // wrapped: hide stats but show giftcreator name data << uint32(item->HasFlag(ITEM_FIELD_FLAGS,ITEM_FLAGS_WRAPPED) ? 1 : 0); - data << uint64(item->GetUInt64Value(ITEM_FIELD_GIFTCREATOR)); + data << item->GetGuidValue(ITEM_FIELD_GIFTCREATOR); data << uint32(item->GetEnchantmentId(PERM_ENCHANTMENT_SLOT)); for(uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot) data << uint32(item->GetEnchantmentId(EnchantmentSlot(enchant_slot))); // creator - data << uint64(item->GetUInt64Value(ITEM_FIELD_CREATOR)); + data << item->GetGuidValue(ITEM_FIELD_CREATOR); data << uint32(item->GetSpellCharges()); // charges data << uint32(item->GetItemSuffixFactor()); // SuffixFactor data << uint32(item->GetItemRandomPropertyId());// random properties id diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 8e717664f..ee69f7629 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1712,8 +1712,8 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss) pVictim->DealDamageMods(this,damage,NULL); WorldPacket data(SMSG_SPELLDAMAGESHIELD,(8+8+4+4+4+4)); - data << uint64(pVictim->GetGUID()); - data << uint64(GetGUID()); + data << pVictim->GetObjectGuid(); + data << GetObjectGuid(); data << uint32(i_spellProto->Id); data << uint32(damage); // Damage data << uint32(0); // Overkill @@ -1735,7 +1735,7 @@ void Unit::HandleEmoteCommand(uint32 emote_id) { WorldPacket data( SMSG_EMOTE, 4 + 8 ); data << uint32(emote_id); - data << uint64(GetGUID()); + data << GetObjectGuid(); SendMessageToSet(&data, true); } @@ -2671,8 +2671,8 @@ float Unit::CalculateLevelPenalty(SpellEntry const* spellProto) const void Unit::SendMeleeAttackStart(Unit* pVictim) { WorldPacket data( SMSG_ATTACKSTART, 8 + 8 ); - data << uint64(GetGUID()); - data << uint64(pVictim->GetGUID()); + data << GetObjectGuid(); + data << pVictim->GetObjectGuid(); SendMessageToSet(&data, true); DEBUG_LOG( "WORLD: Sent SMSG_ATTACKSTART" ); @@ -5025,11 +5025,11 @@ void Unit::SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo) { WorldPacket data(SMSG_SPELLLOGMISS, (4+8+1+4+8+1)); data << uint32(spellID); - data << uint64(GetGUID()); + data << GetObjectGuid(); data << uint8(0); // can be 0 or 1 data << uint32(1); // target count // for(i = 0; i < target count; ++i) - data << uint64(target->GetGUID()); // target GUID + data << target->GetObjectGuid(); // target GUID data << uint8(missInfo); // end loop SendMessageToSet(&data, true); @@ -9638,7 +9638,7 @@ void Unit::SendPetTalk (uint32 pettalk) return; WorldPacket data(SMSG_PET_ACTION_SOUND, 8 + 4); - data << uint64(GetGUID()); + data << GetObjectGuid(); data << uint32(pettalk); ((Player*)owner)->GetSession()->SendPacket(&data); } diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b7d81f89f..efe16756d 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 "10401" + #define REVISION_NR "10402" #endif // __REVISION_NR_H__