aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/SpellHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/SpellHandler.cpp')
-rw-r--r--src/server/game/Handlers/SpellHandler.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/server/game/Handlers/SpellHandler.cpp b/src/server/game/Handlers/SpellHandler.cpp
index ee428694beb..05d03a44012 100644
--- a/src/server/game/Handlers/SpellHandler.cpp
+++ b/src/server/game/Handlers/SpellHandler.cpp
@@ -88,7 +88,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
uint8 bagIndex, slot, castFlags;
uint8 castCount; // next cast if exists (single or not)
- uint64 itemGUID;
+ ObjectGuid itemGUID;
uint32 glyphIndex; // something to do with glyphs?
uint32 spellId; // cast spell id
@@ -261,7 +261,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
uint32 entry = fields[0].GetUInt32();
uint32 flags = fields[1].GetUInt32();
- item->SetUInt64Value(ITEM_FIELD_GIFTCREATOR, 0);
+ item->SetGuidValue(ITEM_FIELD_GIFTCREATOR, ObjectGuid::Empty);
item->SetEntry(entry);
item->SetUInt32Value(ITEM_FIELD_FLAGS, flags);
item->SetState(ITEM_CHANGED, pUser);
@@ -285,10 +285,10 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGameObjectUseOpcode(WorldPacket& recvData)
{
- uint64 guid;
+ ObjectGuid guid;
recvData >> guid;
- TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid));
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_GAMEOBJ_USE Message [%s]", guid.ToString().c_str());
if (GameObject* obj = GetPlayer()->GetMap()->GetGameObject(guid))
{
@@ -306,10 +306,10 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket& recvData)
void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket)
{
- uint64 guid;
+ ObjectGuid guid;
recvPacket >> guid;
- TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [in game guid: %u]", GUID_LOPART(guid));
+ TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [%s]", guid.ToString().c_str());
// ignore for remote control state
if (_player->m_mover != _player)
@@ -435,7 +435,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
spellInfo = actualSpellInfo;
}
- Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE, 0, false);
+ Spell* spell = new Spell(caster, spellInfo, TRIGGERED_NONE, ObjectGuid::Empty, false);
spell->m_cast_count = castCount; // set count of casts
spell->m_glyphIndex = glyphIndex;
spell->prepare(&targets);
@@ -481,7 +481,7 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket)
return;
// maybe should only remove one buff when there are multiple?
- _player->RemoveOwnedAura(spellId, 0, 0, AURA_REMOVE_BY_CANCEL);
+ _player->RemoveOwnedAura(spellId, ObjectGuid::Empty, 0, AURA_REMOVE_BY_CANCEL);
// If spell being removed is a resource tracker, see if player was tracking both (herbs / minerals) and remove the other
if (sWorld->getBoolConfig(CONFIG_ALLOW_TRACK_BOTH_RESOURCES) && spellInfo->HasAura(SPELL_AURA_TRACK_RESOURCES))
@@ -493,19 +493,19 @@ void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket)
// over AuraEffectList caused "incompatible iterator" errors on second pass
std::list<uint32> spellIDs;
- for (Unit::AuraEffectList::const_iterator auraEffect = auraEffects.begin(); auraEffect != auraEffects.end(); auraEffect++)
+ for (Unit::AuraEffectList::const_iterator auraEffect = auraEffects.begin(); auraEffect != auraEffects.end(); ++auraEffect)
spellIDs.push_back((*auraEffect)->GetId());
// Remove all auras related to resource tracking (only Herbs and Minerals in 3.3.5a)
- for (std::list<uint32>::iterator it = spellIDs.begin(); it != spellIDs.end(); it++)
- _player->RemoveOwnedAura(*it, 0, 0, AURA_REMOVE_BY_CANCEL);
+ for (std::list<uint32>::iterator it = spellIDs.begin(); it != spellIDs.end(); ++it)
+ _player->RemoveOwnedAura(*it, ObjectGuid::Empty, 0, AURA_REMOVE_BY_CANCEL);
}
}
}
void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
{
- uint64 guid;
+ ObjectGuid guid;
uint32 spellId;
recvPacket >> guid;
@@ -522,13 +522,13 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
if (!pet)
{
- TC_LOG_ERROR("network", "HandlePetCancelAura: Attempt to cancel an aura for non-existant pet %u by player '%s'", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str());
+ TC_LOG_ERROR("network", "HandlePetCancelAura: Attempt to cancel an aura for non-existant %s by player '%s'", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
return;
}
if (pet != GetPlayer()->GetGuardianPet() && pet != GetPlayer()->GetCharm())
{
- TC_LOG_ERROR("network", "HandlePetCancelAura: Pet %u is not a pet of player '%s'", uint32(GUID_LOPART(guid)), GetPlayer()->GetName().c_str());
+ TC_LOG_ERROR("network", "HandlePetCancelAura: %s is not a pet of player '%s'", guid.ToString().c_str(), GetPlayer()->GetName().c_str());
return;
}
@@ -538,7 +538,7 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
return;
}
- pet->RemoveOwnedAura(spellId, 0, 0, AURA_REMOVE_BY_CANCEL);
+ pet->RemoveOwnedAura(spellId, ObjectGuid::Empty, 0, AURA_REMOVE_BY_CANCEL);
pet->AddCreatureSpellCooldown(spellId);
}
@@ -606,7 +606,7 @@ void WorldSession::HandleSelfResOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleSpellClick(WorldPacket& recvData)
{
- uint64 guid;
+ ObjectGuid guid;
recvData >> guid;
// this will get something not in world. crash
@@ -625,7 +625,7 @@ void WorldSession::HandleSpellClick(WorldPacket& recvData)
void WorldSession::HandleMirrorImageDataRequest(WorldPacket& recvData)
{
TC_LOG_DEBUG("network", "WORLD: CMSG_GET_MIRRORIMAGE_DATA");
- uint64 guid;
+ ObjectGuid guid;
recvData >> guid;
recvData.read_skip<uint32>(); // DisplayId ?
@@ -719,7 +719,7 @@ void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket)
{
TC_LOG_DEBUG("network", "WORLD: CMSG_UPDATE_PROJECTILE_POSITION");
- uint64 casterGuid;
+ ObjectGuid casterGuid;
uint32 spellId;
uint8 castCount;
float x, y, z; // Position of missile hit