aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/PetitionsHandler.cpp
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2013-11-08 11:12:17 +0100
committerSpp <spp@jorge.gr>2013-11-08 11:12:17 +0100
commitab2d26cb910ea9d24ae87d6342f0cbc264fc16cf (patch)
tree87c7ff135e2c45773a25a900d1872aa6fa8afd08 /src/server/game/Handlers/PetitionsHandler.cpp
parent990e4c78514e3a3f8e8905cf22dfacbb0c4fba67 (diff)
parent94e2b9332a1f6ceec024338b8f41cd3dca099a40 (diff)
Merge branch 'master' into 4.3.4
Conflicts: src/server/game/AI/EventAI/CreatureEventAI.cpp src/server/game/AI/EventAI/CreatureEventAIMgr.cpp src/server/game/Achievements/AchievementMgr.cpp src/server/game/Battlegrounds/ArenaTeam.cpp src/server/game/Battlegrounds/BattlegroundMgr.cpp src/server/game/Conditions/ConditionMgr.cpp src/server/game/DataStores/DBCStores.cpp src/server/game/DungeonFinding/LFGMgr.cpp src/server/game/Entities/DynamicObject/DynamicObject.cpp src/server/game/Entities/Object/Object.cpp src/server/game/Entities/Object/Updates/UpdateData.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Globals/ObjectMgr.cpp src/server/game/Guilds/Guild.cpp src/server/game/Guilds/GuildMgr.cpp src/server/game/Handlers/AuctionHouseHandler.cpp src/server/game/Handlers/BattleGroundHandler.cpp src/server/game/Handlers/BattlefieldHandler.cpp src/server/game/Handlers/CalendarHandler.cpp src/server/game/Handlers/CharacterHandler.cpp src/server/game/Handlers/ChatHandler.cpp src/server/game/Handlers/GroupHandler.cpp src/server/game/Handlers/GuildHandler.cpp src/server/game/Handlers/ItemHandler.cpp src/server/game/Handlers/LFGHandler.cpp src/server/game/Handlers/MailHandler.cpp src/server/game/Handlers/MiscHandler.cpp src/server/game/Handlers/MovementHandler.cpp src/server/game/Handlers/NPCHandler.cpp src/server/game/Handlers/PetitionsHandler.cpp src/server/game/Handlers/QuestHandler.cpp src/server/game/Handlers/SpellHandler.cpp src/server/game/Handlers/TradeHandler.cpp src/server/game/Instances/InstanceScript.cpp src/server/game/Server/WorldSession.cpp src/server/game/Server/WorldSocket.cpp src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/game/Spells/Auras/SpellAuras.cpp src/server/game/Spells/Spell.cpp src/server/game/Spells/SpellEffects.cpp src/server/game/Spells/SpellMgr.cpp src/server/game/Tools/PlayerDump.cpp src/server/game/World/World.cpp src/server/scripts/Commands/cs_modify.cpp src/server/scripts/Commands/cs_reload.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp src/server/scripts/Spells/spell_warlock.cpp src/server/worldserver/worldserver.conf.dist
Diffstat (limited to 'src/server/game/Handlers/PetitionsHandler.cpp')
-rw-r--r--src/server/game/Handlers/PetitionsHandler.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index 00de2225912..08a87ef03d7 100644
--- a/src/server/game/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
@@ -52,7 +52,7 @@ enum CharterCosts
void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_BUY");
+ TC_LOG_DEBUG("network", "Received opcode CMSG_PETITION_BUY");
uint64 guidNPC;
uint32 clientIndex; // 1 for guild and arenaslot+1 for arenas in client
@@ -81,13 +81,13 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
recvData >> clientIndex; // index
recvData.read_skip<uint32>(); // 0
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str());
+ TC_LOG_DEBUG("network", "Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str());
// prevent cheating
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guidNPC, UNIT_NPC_FLAG_PETITIONER);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC));
+ TC_LOG_DEBUG("network", "WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC));
return;
}
@@ -136,7 +136,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
type = ARENA_TEAM_CHARTER_5v5_TYPE;
break;
default:
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "unknown selection at buy arena petition: %u", clientIndex);
+ TC_LOG_DEBUG("network", "unknown selection at buy arena petition: %u", clientIndex);
return;
}
@@ -229,7 +229,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
// delete petitions with the same guid as this one
ssInvalidPetitionGUIDs << '\'' << charter->GetGUIDLow() << '\'';
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str());
+ TC_LOG_DEBUG("network", "Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str());
CharacterDatabase.EscapeString(name);
SQLTransaction trans = CharacterDatabase.BeginTransaction();
trans->PAppend("DELETE FROM petition WHERE petitionguid IN (%s)", ssInvalidPetitionGUIDs.str().c_str());
@@ -247,7 +247,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SHOW_SIGNATURES");
+ TC_LOG_DEBUG("network", "Received opcode CMSG_PETITION_SHOW_SIGNATURES");
uint8 signs = 0;
uint64 petitionguid;
@@ -264,7 +264,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
if (!result)
{
- TC_LOG_DEBUG(LOG_FILTER_PLAYER_ITEMS, "Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str());
+ TC_LOG_DEBUG("entities.player.items", "Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str());
return;
}
Field* fields = result->Fetch();
@@ -284,7 +284,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
if (result)
signs = uint8(result->GetRowCount());
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionGuidLow);
+ TC_LOG_DEBUG("network", "CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionGuidLow);
WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+1+signs*12));
data << uint64(petitionguid); // petition guid
@@ -307,13 +307,13 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionQueryOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_QUERY"); // ok
+ TC_LOG_DEBUG("network", "Received opcode CMSG_PETITION_QUERY"); // ok
uint32 guildguid;
uint64 petitionguid;
recvData >> guildguid; // in Trinity always same as GUID_LOPART(petitionguid)
recvData >> petitionguid; // petition guid
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_PETITION_QUERY Petition GUID %u Guild GUID %u", GUID_LOPART(petitionguid), guildguid);
+ TC_LOG_DEBUG("network", "CMSG_PETITION_QUERY Petition GUID %u Guild GUID %u", GUID_LOPART(petitionguid), guildguid);
SendPetitionQueryOpcode(petitionguid);
}
@@ -339,7 +339,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
+ TC_LOG_DEBUG("network", "CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
return;
}
@@ -382,7 +382,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_RENAME");
+ TC_LOG_DEBUG("network", "Received opcode MSG_PETITION_RENAME");
uint64 petitionGuid;
uint32 type;
@@ -408,7 +408,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
}
else
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionGuid));
+ TC_LOG_DEBUG("network", "CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionGuid));
return;
}
@@ -446,7 +446,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
CharacterDatabase.Execute(stmt);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Petition (GUID: %u) renamed to '%s'", GUID_LOPART(petitionGuid), newName.c_str());
+ TC_LOG_DEBUG("network", "Petition (GUID: %u) renamed to '%s'", GUID_LOPART(petitionGuid), newName.c_str());
WorldPacket data(MSG_PETITION_RENAME, (8+newName.size()+1));
data << uint64(petitionGuid);
data << newName;
@@ -455,7 +455,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SIGN"); // ok
+ TC_LOG_DEBUG("network", "Received opcode CMSG_PETITION_SIGN"); // ok
Field* fields;
uint64 petitionGuid;
@@ -472,7 +472,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
if (!result)
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Petition %u is not found for player %u %s", GUID_LOPART(petitionGuid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str());
+ TC_LOG_ERROR("network", "Petition %u is not found for player %u %s", GUID_LOPART(petitionGuid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str());
return;
}
@@ -566,7 +566,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
CharacterDatabase.Execute(stmt);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "PETITION SIGN: GUID %u by player: %s (GUID: %u Account: %u)", GUID_LOPART(petitionGuid), _player->GetName().c_str(), playerGuid, GetAccountId());
+ TC_LOG_DEBUG("network", "PETITION SIGN: GUID %u by player: %s (GUID: %u Account: %u)", GUID_LOPART(petitionGuid), _player->GetName().c_str(), playerGuid, GetAccountId());
WorldPacket data(SMSG_PETITION_SIGN_RESULTS, (8+8+4));
data << uint64(petitionGuid);
@@ -588,12 +588,12 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_DECLINE"); // ok
+ TC_LOG_DEBUG("network", "Received opcode MSG_PETITION_DECLINE"); // ok
uint64 petitionguid;
uint64 ownerguid;
recvData >> petitionguid; // petition guid
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Petition %u declined by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "Petition %u declined by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PETITION_OWNER_BY_GUID);
@@ -618,7 +618,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket& recvData)
void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_OFFER_PETITION"); // ok
+ TC_LOG_DEBUG("network", "Received opcode CMSG_OFFER_PETITION"); // ok
uint8 signs = 0;
uint64 petitionguid, plguid;
@@ -644,7 +644,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
Field* fields = result->Fetch();
type = fields[0].GetUInt8();
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid));
+ TC_LOG_DEBUG("network", "OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid));
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != player->GetTeam())
{
@@ -727,7 +727,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket& recvData)
void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received opcode CMSG_TURN_IN_PETITION");
+ TC_LOG_DEBUG("network", "Received opcode CMSG_TURN_IN_PETITION");
// Get petition guid from packet
WorldPacket data;
@@ -740,7 +740,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
if (!item)
return;
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Petition %u turned in by %u", GUID_LOPART(petitionGuid), _player->GetGUIDLow());
+ TC_LOG_DEBUG("network", "Petition %u turned in by %u", GUID_LOPART(petitionGuid), _player->GetGUIDLow());
// Get petition data from db
uint32 ownerguidlo;
@@ -760,7 +760,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
}
else
{
- TC_LOG_ERROR(LOG_FILTER_NETWORKIO, "Player %s (guid: %u) tried to turn in petition (guid: %u) that is not present in the database", _player->GetName().c_str(), _player->GetGUIDLow(), GUID_LOPART(petitionGuid));
+ TC_LOG_ERROR("network", "Player %s (guid: %u) tried to turn in petition (guid: %u) that is not present in the database", _player->GetName().c_str(), _player->GetGUIDLow(), GUID_LOPART(petitionGuid));
return;
}
@@ -882,14 +882,14 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
// Register arena team
sArenaTeamMgr->AddArenaTeam(arenaTeam);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "PetitonsHandler: Arena team (guid: %u) added to ObjectMgr", arenaTeam->GetId());
+ TC_LOG_DEBUG("network", "PetitonsHandler: Arena team (guid: %u) added to ObjectMgr", arenaTeam->GetId());
// Add members
for (uint8 i = 0; i < signatures; ++i)
{
Field* fields = result->Fetch();
uint32 memberGUID = fields[0].GetUInt32();
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "PetitionsHandler: Adding arena team (guid: %u) member %u", arenaTeam->GetId(), memberGUID);
+ TC_LOG_DEBUG("network", "PetitionsHandler: Adding arena team (guid: %u) member %u", arenaTeam->GetId(), memberGUID);
arenaTeam->AddMember(MAKE_NEW_GUID(memberGUID, 0, HIGHGUID_PLAYER));
result->NextRow();
}
@@ -908,7 +908,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
CharacterDatabase.CommitTransaction(trans);
// created
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "TURN IN PETITION GUID %u", GUID_LOPART(petitionGuid));
+ TC_LOG_DEBUG("network", "TURN IN PETITION GUID %u", GUID_LOPART(petitionGuid));
data.Initialize(SMSG_TURN_IN_PETITION_RESULTS, 4);
data << (uint32)PETITION_TURN_OK;
@@ -917,7 +917,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket& recvData)
void WorldSession::HandlePetitionShowListOpcode(WorldPacket& recvData)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Received CMSG_PETITION_SHOWLIST");
+ TC_LOG_DEBUG("network", "Received CMSG_PETITION_SHOWLIST");
uint64 guid;
recvData >> guid;
@@ -930,7 +930,7 @@ void WorldSession::SendPetitionShowList(uint64 guid)
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_PETITIONER);
if (!creature)
{
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ TC_LOG_DEBUG("network", "WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -974,5 +974,5 @@ void WorldSession::SendPetitionShowList(uint64 guid)
}
SendPacket(&data);
- TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "Sent SMSG_PETITION_SHOWLIST");
+ TC_LOG_DEBUG("network", "Sent SMSG_PETITION_SHOWLIST");
}