diff options
Diffstat (limited to 'src/server/game/Handlers/MiscHandler.cpp')
-rwxr-xr-x | src/server/game/Handlers/MiscHandler.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp index f220be7d2b5..aaa41ec3519 100755 --- a/src/server/game/Handlers/MiscHandler.cpp +++ b/src/server/game/Handlers/MiscHandler.cpp @@ -125,11 +125,11 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data) if (GetPlayer()->HasUnitState(UNIT_STATE_DIED)) GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH); - if ((unit && unit->GetCreatureInfo()->ScriptID != unit->LastUsedScriptID) || (go && go->GetGOInfo()->ScriptId != go->LastUsedScriptID)) + if ((unit && unit->GetCreatureTemplate()->ScriptID != unit->LastUsedScriptID) || (go && go->GetGOInfo()->ScriptId != go->LastUsedScriptID)) { sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - Script reloaded while in use, ignoring and set new scipt id"); if (unit) - unit->LastUsedScriptID = unit->GetCreatureInfo()->ScriptID; + unit->LastUsedScriptID = unit->GetCreatureTemplate()->ScriptID; if (go) go->LastUsedScriptID = go->GetGOInfo()->ScriptId; _player->PlayerTalkClass->SendCloseGossip(); @@ -811,7 +811,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data) Player* player = GetPlayer(); if (player->isInFlight()) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u", + sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u", player->GetName(), player->GetGUIDLow(), triggerId); return; } @@ -819,14 +819,14 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data) AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(triggerId); if (!atEntry) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u", + sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u", player->GetName(), player->GetGUIDLow(), triggerId); return; } if (player->GetMapId() != atEntry->mapid) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", + sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", player->GetName(), atEntry->mapid, player->GetMapId(), player->GetGUIDLow(), triggerId); return; } @@ -840,7 +840,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data) float dist = player->GetDistance(atEntry->x, atEntry->y, atEntry->z); if (dist > atEntry->radius + delta) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) too far (radius: %f distance: %f), ignore Area Trigger ID: %u", + sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (radius: %f distance: %f), ignore Area Trigger ID: %u", player->GetName(), player->GetGUIDLow(), atEntry->radius, dist, triggerId); return; } @@ -871,7 +871,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data) (fabs(dy) > atEntry->box_y / 2 + delta) || (fabs(dz) > atEntry->box_z / 2 + delta)) { - sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotatedPlayerX: %f rotatedPlayerY: %f dZ:%f), ignore Area Trigger ID: %u", + sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleAreaTriggerOpcode: Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotatedPlayerX: %f rotatedPlayerY: %f dZ:%f), ignore Area Trigger ID: %u", player->GetName(), player->GetGUIDLow(), atEntry->box_x/2, atEntry->box_y/2, atEntry->box_z/2, rotPlayerX, rotPlayerY, dz, triggerId); return; } @@ -1325,7 +1325,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data) WorldPacket data(SMSG_WHOIS, msg.size()+1); data << msg; - _player->GetSession()->SendPacket(&data); + SendPacket(&data); sLog->outDebug(LOG_FILTER_NETWORKIO, "Received whois command from player %s for character %s", GetPlayer()->GetName(), charname.c_str()); } @@ -1501,16 +1501,16 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data) { for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { - Player* pGroupGuy = itr->getSource(); - if (!pGroupGuy) + Player* groupGuy = itr->getSource(); + if (!groupGuy) continue; - if (!pGroupGuy->IsInMap(pGroupGuy)) + if (!groupGuy->IsInMap(groupGuy)) return; - if (pGroupGuy->GetMap()->IsNonRaidDungeon()) + if (groupGuy->GetMap()->IsNonRaidDungeon()) { - sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!", _player->GetGUIDLow(), pGroupGuy->GetName(), pGroupGuy->GetGUIDLow()); + sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while group member (Name: %s, GUID: %u) is inside!", _player->GetGUIDLow(), groupGuy->GetName(), groupGuy->GetGUIDLow()); return; } } @@ -1558,14 +1558,14 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data) { for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next()) { - Player* pGroupGuy = itr->getSource(); - if (!pGroupGuy) + Player* groupGuy = itr->getSource(); + if (!groupGuy) continue; - if (!pGroupGuy->IsInMap(pGroupGuy)) + if (!groupGuy->IsInMap(groupGuy)) return; - if (pGroupGuy->GetMap()->IsRaid()) + if (groupGuy->GetMap()->IsRaid()) { sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow()); return; |