Add spaces after commas

This commit is contained in:
leak
2011-04-29 20:47:02 +02:00
parent 01a79947d5
commit 1003f30448
645 changed files with 9439 additions and 9439 deletions
@@ -33,7 +33,7 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recvData)
uint64 guid;
recvData >> guid;
sLog->outDebug(LOG_FILTER_NETWORKIO, "Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
sLog->outDebug(LOG_FILTER_NETWORKIO, "Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
if (Player* player = sObjectMgr->GetPlayer(guid))
{
@@ -176,7 +176,7 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
// Add player to team
if (!arenaTeam->AddMember(_player->GetGUID()))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S,"","",ERR_ARENA_TEAM_INTERNAL);
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", "", ERR_ARENA_TEAM_INTERNAL);
return;
}
@@ -354,7 +354,7 @@ void WorldSession::SendNotInArenaTeamPacket(uint8 type)
uint32 unk = 0;
data << uint32(unk); // unk(0)
if (!unk)
data << uint8(type); // team type (2=2v2,3=3v3,5=5v5), can be used for custom types...
data << uint8(type); // team type (2=2v2, 3=3v3, 5=5v5), can be used for custom types...
SendPacket(&data);
}
@@ -37,7 +37,7 @@ void WorldSession::HandleAuctionHelloOpcode(WorldPacket & recv_data)
uint64 guid; //NPC guid
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_AUCTIONEER);
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
@@ -129,7 +129,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
if (!item || !bid || !etime)
return; //check for cheaters
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer,UNIT_NPC_FLAG_AUCTIONEER);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!pCreature)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)));
@@ -206,8 +206,8 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
if (GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
{
sLog->outCommand(GetAccountId(),"GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
GetPlayerName(),GetAccountId(),it->GetTemplate()->Name1.c_str(),it->GetEntry(),count);
sLog->outCommand(GetAccountId(), "GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
GetPlayerName(), GetAccountId(), it->GetTemplate()->Name1.c_str(), it->GetEntry(), count);
}
pl->ModifyMoney(-int32(deposit));
@@ -334,7 +334,7 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
auction->bid = price;
GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_AUCTION_BID, price);
trans->PAppend("UPDATE auctionhouse SET buyguid = '%u',lastbid = '%u' WHERE id = '%u'", auction->bidder, auction->bid, auction->Id);
trans->PAppend("UPDATE auctionhouse SET buyguid = '%u', lastbid = '%u' WHERE id = '%u'", auction->bidder, auction->bid, auction->Id);
SendAuctionCommandResult(auction->Id, AUCTION_PLACE_BID, AUCTION_OK, 0);
}
@@ -379,7 +379,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
recv_data >> auctionId;
//sLog->outDebug("Cancel AUCTION AuctionID: %u", auctionId);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer,UNIT_NPC_FLAG_AUCTIONEER);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!pCreature)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionRemoveItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)));
@@ -460,11 +460,11 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
recv_data >> outbiddedCount;
if (recv_data.size() != (16 + outbiddedCount * 4))
{
sLog->outError("Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recv_data.size(),(16 + outbiddedCount * 4));
sLog->outError("Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recv_data.size(), (16 + outbiddedCount * 4));
outbiddedCount = 0;
}
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_AUCTIONEER);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!pCreature)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListBidderItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
@@ -495,7 +495,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
}
}
auctionHouse->BuildListBidderItems(data,pl,count,totalcount);
auctionHouse->BuildListBidderItems(data, pl, count, totalcount);
data.put<uint32>(0, count); // add count to placeholder
data << totalcount;
data << (uint32)300; //unk 2.3.0
@@ -511,7 +511,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data)
recv_data >> guid;
recv_data >> listfrom; // not used in fact (this list not have page control in client)
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_AUCTIONEER);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!pCreature)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListOwnerItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
@@ -530,7 +530,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data)
uint32 count = 0;
uint32 totalcount = 0;
auctionHouse->BuildListOwnerItems(data,_player,count,totalcount);
auctionHouse->BuildListOwnerItems(data, _player, count, totalcount);
data.put<uint32>(0, count);
data << (uint32) totalcount;
data << (uint32) 0;
@@ -564,7 +564,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data)
recv_data.read_skip<uint8>();
}
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_AUCTIONEER);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!pCreature)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
@@ -578,7 +578,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data)
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(pCreature->getFaction());
//sLog->outDebug("Auctionhouse search (GUID: %u TypeId: %u)", , list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",
// GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)), listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable);
// GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)), listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable);
WorldPacket data(SMSG_AUCTION_LIST_RESULT, (4+4+4));
uint32 count = 0;
@@ -587,15 +587,15 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data)
// converting string that we try to find to lower case
std::wstring wsearchedname;
if (!Utf8toWStr(searchedname,wsearchedname))
if (!Utf8toWStr(searchedname, wsearchedname))
return;
wstrToLower(wsearchedname);
auctionHouse->BuildListAuctionItems(data,_player,
auctionHouse->BuildListAuctionItems(data, _player,
wsearchedname, listfrom, levelmin, levelmax, usable,
auctionSlotID, auctionMainCategory, auctionSubCategory, quality,
count,totalcount);
count, totalcount);
data.put<uint32>(0, count);
data << (uint32) totalcount;
@@ -39,7 +39,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data)
{
uint64 guid;
recv_data >> guid;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
@@ -86,7 +86,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
if (!sBattlemasterListStore.LookupEntry(bgTypeId_))
{
sLog->outError("Battleground: invalid bgtype (%u) received. possible cheater? player guid %u",bgTypeId_,_player->GetGUIDLow());
sLog->outError("Battleground: invalid bgtype (%u) received. possible cheater? player guid %u", bgTypeId_, _player->GetGUIDLow());
return;
}
@@ -119,7 +119,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
return;
// expected bracket entry
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(),_player->getLevel());
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
if (!bracketEntry)
return;
@@ -189,7 +189,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
// send status packet (in queue)
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, ginfo->ArenaType);
SendPacket(&data);
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s", bgQueueTypeId, bgTypeId, _player->GetGUIDLow(), _player->GetName());
}
else
{
@@ -208,7 +208,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
if (err > 0)
{
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: the following players are joining as group:");
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: the following players are joining as group:");
ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, 0, false, isPremade, 0, 0);
avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
}
@@ -235,9 +235,9 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
member->GetSession()->SendPacket(&data);
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,member->GetGUIDLow(), member->GetName());
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s", bgQueueTypeId, bgTypeId, member->GetGUIDLow(), member->GetName());
}
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: group end");
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: group end");
}
sBattlegroundMgr->ScheduleQueueUpdate(0, 0, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
@@ -404,7 +404,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
}
// expected bracket entry
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(),_player->getLevel());
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
if (!bracketEntry)
return;
@@ -419,7 +419,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data2, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
_player->GetSession()->SendPacket(&data2);
action = 0;
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName(), _player->GetGUIDLow());
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName(), _player->GetGUIDLow());
}
//if player don't match battleground max level, then do not allow him to enter! (this might happen when player leveled up during his waiting in queue
if (_player->getLevel() > bg->GetMaxLevel())
@@ -469,8 +469,8 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
// bg->HandleBeforeTeleportToBattleground(_player);
sBattlegroundMgr->SendToBattleground(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
// add only in HandleMoveWorldPortAck()
// bg->AddPlayer(_player,team);
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId);
// bg->AddPlayer(_player, team);
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId);
break;
case 0: // leave queue
// if player leaves rated arena match before match start, it is counted as he played but he lost
@@ -479,7 +479,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
ArenaTeam * at = sObjectMgr->GetArenaTeamById(ginfo.Team);
if (at)
{
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
at->MemberLost(_player, ginfo.OpponentsMatchmakerRating);
at->SaveToDB();
}
@@ -491,7 +491,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
if (!ginfo.ArenaType)
sBattlegroundMgr->ScheduleQueueUpdate(ginfo.ArenaMatchmakerRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
SendPacket(&data);
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId);
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId);
break;
default:
sLog->outError("Battleground port: unknown action %u", action);
@@ -569,7 +569,7 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/)
continue;
// expected bracket entry
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(),_player->getLevel());
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
if (!bracketEntry)
continue;
@@ -681,7 +681,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
BattlegroundTypeId bgTypeId = bg->GetTypeID();
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, arenatype);
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(),_player->getLevel());
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), _player->getLevel());
if (!bracketEntry)
return;
@@ -736,10 +736,10 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
if (err > 0)
{
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: arena join as group start");
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: arena join as group start");
if (isRated)
{
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: arena team id %u, leader %s queued with matchmaker rating %u for type %u",_player->GetArenaTeamId(arenaslot),_player->GetName(),matchmakerRating,arenatype);
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: arena team id %u, leader %s queued with matchmaker rating %u for type %u", _player->GetArenaTeamId(arenaslot), _player->GetName(), matchmakerRating, arenatype);
bg->SetRated(true);
}
else
@@ -772,7 +772,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
member->GetSession()->SendPacket(&data);
sBattlegroundMgr->BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player joined queue for arena as group bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,member->GetGUIDLow(), member->GetName());
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player joined queue for arena as group bg queue type %u bg type %u: GUID %u, NAME %s", bgQueueTypeId, bgTypeId, member->GetGUIDLow(), member->GetName());
}
}
else
@@ -785,7 +785,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
// send status packet (in queue)
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype);
SendPacket(&data);
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"Battleground: player joined queue for arena, skirmish, bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Battleground: player joined queue for arena, skirmish, bg queue type %u bg type %u: GUID %u, NAME %s", bgQueueTypeId, bgTypeId, _player->GetGUIDLow(), _player->GetName());
}
sBattlegroundMgr->ScheduleQueueUpdate(matchmakerRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
}
@@ -798,11 +798,11 @@ void WorldSession::HandleReportPvPAFK(WorldPacket & recv_data)
if (!reportedPlayer)
{
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"WorldSession::HandleReportPvPAFK: player not found");
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "WorldSession::HandleReportPvPAFK: player not found");
return;
}
sLog->outDebug(LOG_FILTER_BATTLEGROUND,"WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName(), reportedPlayer->GetName());
sLog->outDebug(LOG_FILTER_BATTLEGROUND, "WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName(), reportedPlayer->GetName());
reportedPlayer->ReportedAfkBy(_player);
}
@@ -31,7 +31,7 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/)
time_t cur_time = time(NULL);
WorldPacket data(SMSG_CALENDAR_SEND_CALENDAR,4+4*0+4+4*0+4+4);
WorldPacket data(SMSG_CALENDAR_SEND_CALENDAR, 4+4*0+4+4*0+4+4);
data << uint32(0); // invite count
/*
@@ -178,7 +178,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
// recv_data >> (uint32)count;
// if (count)
// {
// uint8 unk12,unk13;
// uint8 unk12, unk13;
// uint64 guid;
// for (int i=0; i<count; i++)
// {
@@ -207,7 +207,7 @@ void WorldSession::HandleCharEnum(QueryResult result)
do
{
uint32 guidlow = (*result)[0].GetUInt32();
sLog->outDetail("Loading char guid %u from account %u.",guidlow,GetAccountId());
sLog->outDetail("Loading char guid %u from account %u.", guidlow, GetAccountId());
if (Player::BuildEnumData(result, &data))
{
_allowedCharsToLogin.insert(guidlow);
@@ -263,7 +263,7 @@ void WorldSession::HandleCharEnumOpcode(WorldPacket & /*recv_data*/)
void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
{
std::string name;
uint8 race_,class_;
uint8 race_, class_;
recv_data >> name;
@@ -321,7 +321,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
if (raceEntry->expansion > Expansion())
{
data << (uint8)CHAR_CREATE_EXPANSION;
sLog->outError("Expansion %u account:[%d] tried to Create character with expansion %u race (%u)",Expansion(),GetAccountId(),raceEntry->expansion,race_);
sLog->outError("Expansion %u account:[%d] tried to Create character with expansion %u race (%u)", Expansion(), GetAccountId(), raceEntry->expansion, race_);
SendPacket(&data);
return;
}
@@ -330,7 +330,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
if (classEntry->expansion > Expansion())
{
data << (uint8)CHAR_CREATE_EXPANSION_CLASS;
sLog->outError("Expansion %u account:[%d] tried to Create character with expansion %u class (%u)",Expansion(),GetAccountId(),classEntry->expansion,class_);
sLog->outError("Expansion %u account:[%d] tried to Create character with expansion %u class (%u)", Expansion(), GetAccountId(), classEntry->expansion, class_);
SendPacket(&data);
return;
}
@@ -359,12 +359,12 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
{
data << (uint8)CHAR_NAME_NO_NAME;
SendPacket(&data);
sLog->outError("Account:[%d] but tried to Create character with empty [name] ",GetAccountId());
sLog->outError("Account:[%d] but tried to Create character with empty [name] ", GetAccountId());
return;
}
// check name limitations
uint8 res = ObjectMgr::CheckPlayerName(name,true);
uint8 res = ObjectMgr::CheckPlayerName(name, true);
if (res != CHAR_NAME_SUCCESS)
{
data << uint8(res);
@@ -443,7 +443,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
if (!AllowTwoSideAccounts || skipCinematics == 1 || class_ == CLASS_DEATH_KNIGHT)
{
QueryResult result2 = CharacterDatabase.PQuery("SELECT level,race,class FROM characters WHERE account = '%u' %s",
QueryResult result2 = CharacterDatabase.PQuery("SELECT level, race, class FROM characters WHERE account = '%u' %s",
GetAccountId(), (skipCinematics == 1 || class_ == CLASS_DEATH_KNIGHT) ? "" : "LIMIT 1");
if (result2)
{
@@ -614,7 +614,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
return;
}
QueryResult result = CharacterDatabase.PQuery("SELECT account,name FROM characters WHERE guid='%u'", GUID_LOPART(guid));
QueryResult result = CharacterDatabase.PQuery("SELECT account, name FROM characters WHERE guid='%u'", GUID_LOPART(guid));
if (result)
{
Field *fields = result->Fetch();
@@ -627,15 +627,15 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
return;
std::string IP_str = GetRemoteAddress();
sLog->outDetail("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)",GetAccountId(),IP_str.c_str(),name.c_str(),GUID_LOPART(guid));
sLog->outChar("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)",GetAccountId(),IP_str.c_str(),name.c_str(),GUID_LOPART(guid));
sLog->outDetail("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
sLog->outChar("Account: %d (IP: %s) Delete Character:[%s] (GUID: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
sScriptMgr->OnPlayerDelete(guid);
if (sLog->IsOutCharDump()) // optimize GetPlayerDump call
{
std::string dump;
if (PlayerDumpWriter().GetDump(GUID_LOPART(guid), dump))
sLog->outCharDump(dump.c_str(),GetAccountId(),GUID_LOPART(guid),name.c_str());
sLog->outCharDump(dump.c_str(), GetAccountId(), GUID_LOPART(guid), name.c_str());
}
Player::DeleteFromDB(guid, GetAccountId());
@@ -649,7 +649,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recv_data)
{
if (PlayerLoading() || GetPlayer() != NULL)
{
sLog->outError("Player tryes to login again, AccountId = %d",GetAccountId());
sLog->outError("Player tryes to login again, AccountId = %d", GetAccountId());
return;
}
@@ -729,11 +729,11 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
std::string::size_type pos, nextpos;
pos = 0;
while ((nextpos= str_motd.find('@',pos)) != std::string::npos)
while ((nextpos= str_motd.find('@', pos)) != std::string::npos)
{
if (nextpos != pos)
{
data << str_motd.substr(pos,nextpos-pos);
data << str_motd.substr(pos, nextpos-pos);
++linecount;
}
pos = nextpos+1;
@@ -757,7 +757,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
sLog->outStaticDebug("WORLD: Sent server info");
}
//QueryResult *result = CharacterDatabase.PQuery("SELECT guildid,rank FROM guild_member WHERE guid = '%u'",pCurrChar->GetGUIDLow());
//QueryResult *result = CharacterDatabase.PQuery("SELECT guildid, rank FROM guild_member WHERE guid = '%u'", pCurrChar->GetGUIDLow());
if (PreparedQueryResult resultGuild = holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADGUILD))
{
Field* fields = resultGuild->Fetch();
@@ -777,7 +777,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
else
{
// remove wrong guild data
sLog->outError("Player %s (GUID: %u) marked as member of not existing guild (id: %u), removing guild membership for player.",pCurrChar->GetName(),pCurrChar->GetGUIDLow(),pCurrChar->GetGuildId());
sLog->outError("Player %s (GUID: %u) marked as member of not existing guild (id: %u), removing guild membership for player.", pCurrChar->GetName(), pCurrChar->GetGUIDLow(), pCurrChar->GetGuildId());
pCurrChar->SetInGuild(0);
}
}
@@ -817,7 +817,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
}
sObjectAccessor->AddObject(pCurrChar);
//sLog->outDebug("Player %s added to Map.",pCurrChar->GetName());
//sLog->outDebug("Player %s added to Map.", pCurrChar->GetName());
pCurrChar->SendInitialPacketsAfterAddToMap();
@@ -860,7 +860,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
pCurrChar->LoadPet();
// Set FFA PvP for non GM in non-rest mode
if (sWorld->IsFFAPvPRealm() && !pCurrChar->isGameMaster() && !pCurrChar->HasFlag(PLAYER_FLAGS,PLAYER_FLAGS_RESTING))
if (sWorld->IsFFAPvPRealm() && !pCurrChar->isGameMaster() && !pCurrChar->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING))
pCurrChar->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
if (pCurrChar->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP))
@@ -885,7 +885,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
// show time before shutdown if shutdown planned.
if (sWorld->IsShutdowning())
sWorld->ShutdownMsg(true,pCurrChar);
sWorld->ShutdownMsg(true, pCurrChar);
if (sWorld->getBoolConfig(CONFIG_ALL_TAXI_PATHS))
pCurrChar->SetTaxiCheater(true);
@@ -895,7 +895,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
std::string IP_str = GetRemoteAddress();
sLog->outChar("Account: %d (IP: %s) Login Character:[%s] (GUID: %u)",
GetAccountId(),IP_str.c_str(),pCurrChar->GetName() ,pCurrChar->GetGUIDLow());
GetAccountId(), IP_str.c_str(), pCurrChar->GetName() , pCurrChar->GetGUIDLow());
if (!pCurrChar->IsStandState() && !pCurrChar->HasUnitState(UNIT_STAT_STUNNED))
pCurrChar->SetStandState(UNIT_STAND_STATE_STAND);
@@ -916,7 +916,7 @@ void WorldSession::HandleSetFactionAtWar(WorldPacket & recv_data)
recv_data >> repListID;
recv_data >> flag;
GetPlayer()->GetReputationMgr().SetAtWar(repListID,flag);
GetPlayer()->GetReputationMgr().SetAtWar(repListID, flag);
}
//I think this function is never used :/ I dunno, but i guess this opcode not exists
@@ -1027,7 +1027,7 @@ void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
return;
}
uint8 res = ObjectMgr::CheckPlayerName(newname,true);
uint8 res = ObjectMgr::CheckPlayerName(newname, true);
if (res != CHAR_NAME_SUCCESS)
{
WorldPacket data(SMSG_CHAR_RENAME, 1);
@@ -1162,7 +1162,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
SQLTransaction trans = CharacterDatabase.BeginTransaction();
trans->PAppend("DELETE FROM character_declinedname WHERE guid = '%u'", GUID_LOPART(guid));
trans->PAppend("INSERT INTO character_declinedname (guid, genitive, dative, accusative, instrumental, prepositional) VALUES ('%u','%s','%s','%s','%s','%s')",
trans->PAppend("INSERT INTO character_declinedname (guid, genitive, dative, accusative, instrumental, prepositional) VALUES ('%u', '%s', '%s', '%s', '%s', '%s')",
GUID_LOPART(guid), declinedname.name[0].c_str(), declinedname.name[1].c_str(), declinedname.name[2].c_str(), declinedname.name[3].c_str(), declinedname.name[4].c_str());
CharacterDatabase.CommitTransaction(trans);
@@ -1197,7 +1197,7 @@ void WorldSession::HandleAlterAppearance(WorldPacket & recv_data)
uint32 Cost = _player->GetBarberShopCost(bs_hair->hair_id, Color, bs_facialHair->hair_id, bs_skinColor);
// 0 - ok
// 1,3 - not enough money
// 1, 3 - not enough money
// 2 - you have to seat on barber chair
if (!_player->HasEnoughMoney(Cost))
{
@@ -1289,7 +1289,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
return;
}
uint8 res = ObjectMgr::CheckPlayerName(newname,true);
uint8 res = ObjectMgr::CheckPlayerName(newname, true);
if (res != CHAR_NAME_SUCCESS)
{
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
@@ -1509,7 +1509,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
return;
}
uint8 res = ObjectMgr::CheckPlayerName(newname,true);
uint8 res = ObjectMgr::CheckPlayerName(newname, true);
if (res != CHAR_NAME_SUCCESS)
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
@@ -1654,7 +1654,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
}
// Delete all current quests
trans->PAppend("DELETE FROM `character_queststatus` WHERE guid ='%u'",GUID_LOPART(guid));
trans->PAppend("DELETE FROM `character_queststatus` WHERE guid ='%u'", GUID_LOPART(guid));
// Delete record of the faction old completed quests
{
@@ -1669,7 +1669,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
if (requiredRaces & RACEMASK_ALLIANCE)
{
quests << uint32(qinfo->GetQuestId());
quests << ",";
quests << ", ";
}
}
else // if (team == BG_TEAM_HORDE)
@@ -1677,7 +1677,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
if (requiredRaces & RACEMASK_HORDE)
{
quests << uint32(qinfo->GetQuestId());
quests << ",";
quests << ", ";
}
}
}
@@ -163,7 +163,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
if (!_player->CanSpeak())
{
std::string timeStr = secsToTimeString(m_muteTime - time(NULL));
SendNotification(GetTrinityString(LANG_WAIT_BEFORE_SPEAKING),timeStr.c_str());
SendNotification(GetTrinityString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
return;
}
@@ -519,7 +519,7 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket & recv_data)
if (!GetPlayer()->CanSpeak())
{
std::string timeStr = secsToTimeString(m_muteTime - time(NULL));
SendNotification(GetTrinityString(LANG_WAIT_BEFORE_SPEAKING),timeStr.c_str());
SendNotification(GetTrinityString(LANG_WAIT_BEFORE_SPEAKING), timeStr.c_str());
return;
}
@@ -36,9 +36,9 @@ void WorldSession::HandleAttackSwingOpcode(WorldPacket & recv_data)
if (!pEnemy)
{
if (!IS_UNIT_GUID(guid))
sLog->outError("WORLD: Object %u (TypeID: %u) isn't player, pet or creature",GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
sLog->outError("WORLD: Object %u (TypeID: %u) isn't player, pet or creature", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
else
sLog->outError("WORLD: Enemy %s %u not found",GetLogNameForGuid(guid),GUID_LOPART(guid));
sLog->outError("WORLD: Enemy %s %u not found", GetLogNameForGuid(guid), GUID_LOPART(guid));
// stop attack state at client
SendAttackStop(NULL);
@@ -52,7 +52,7 @@ void WorldSession::HandleAttackSwingOpcode(WorldPacket & recv_data)
return;
}
_player->Attack(pEnemy,true);
_player->Attack(pEnemy, true);
}
void WorldSession::HandleAttackStopOpcode(WorldPacket & /*recv_data*/)
@@ -69,7 +69,7 @@ void WorldSession::HandleSetSheathedOpcode(WorldPacket & recv_data)
if (sheathed >= MAX_SHEATH_STATE)
{
sLog->outError("Unknown sheath state %u ??",sheathed);
sLog->outError("Unknown sheath state %u ??", sheathed);
return;
}
@@ -42,8 +42,8 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
return;
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Received CMSG_DUEL_ACCEPTED");
sLog->outStaticDebug("Player 1 is: %u (%s)", pl->GetGUIDLow(),pl->GetName());
sLog->outStaticDebug("Player 2 is: %u (%s)", plTarget->GetGUIDLow(),plTarget->GetName());
sLog->outStaticDebug("Player 1 is: %u (%s)", pl->GetGUIDLow(), pl->GetName());
sLog->outStaticDebug("Player 2 is: %u (%s)", plTarget->GetGUIDLow(), plTarget->GetName());
time_t now = time(NULL);
pl->duel->startTimer = now;
@@ -930,7 +930,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data)
data << (uint8) 1;
}
}
data.put<uint64>(maskPos,auramask); // GROUP_UPDATE_FLAG_AURAS
data.put<uint64>(maskPos, auramask); // GROUP_UPDATE_FLAG_AURAS
if (pet)
{
@@ -956,7 +956,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data)
data << (uint8) 1;
}
}
data.put<uint64>(petMaskPos,petauramask); // GROUP_UPDATE_FLAG_PET_AURAS
data.put<uint64>(petMaskPos, petauramask); // GROUP_UPDATE_FLAG_PET_AURAS
}
else
{
@@ -493,7 +493,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data)
if (!itemguid)
return;
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid,UNIT_NPC_FLAG_VENDOR);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!pCreature)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
@@ -604,7 +604,7 @@ void WorldSession::HandleBuybackItem(WorldPacket & recv_data)
recv_data >> vendorguid >> slot;
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid,UNIT_NPC_FLAG_VENDOR);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!pCreature)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
@@ -683,7 +683,7 @@ void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket & recv_data)
if (bag == NULL_BAG)
return;
GetPlayer()->BuyItemFromVendorSlot(vendorguid,slot,item,count,bag,bagslot);
GetPlayer()->BuyItemFromVendorSlot(vendorguid, slot, item, count, bag, bagslot);
}
void WorldSession::HandleBuyItemOpcode(WorldPacket & recv_data)
@@ -701,7 +701,7 @@ void WorldSession::HandleBuyItemOpcode(WorldPacket & recv_data)
else
return; // cheating
GetPlayer()->BuyItemFromVendorSlot(vendorguid,slot,item,count,NULL_BAG,NULL_SLOT);
GetPlayer()->BuyItemFromVendorSlot(vendorguid, slot, item, count, NULL_BAG, NULL_SLOT);
}
void WorldSession::HandleListInventoryOpcode(WorldPacket & recv_data)
@@ -722,7 +722,7 @@ void WorldSession::SendListInventory(uint64 vendorguid)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_LIST_INVENTORY");
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid,UNIT_NPC_FLAG_VENDOR);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!pCreature)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendListInventory - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
@@ -993,7 +993,7 @@ void WorldSession::HandleSetAmmoOpcode(WorldPacket & recv_data)
GetPlayer()->SetAmmo(item);
}
void WorldSession::SendEnchantmentLog(uint64 Target, uint64 Caster,uint32 ItemID,uint32 SpellID)
void WorldSession::SendEnchantmentLog(uint64 Target, uint64 Caster, uint32 ItemID, uint32 SpellID)
{
WorldPacket data(SMSG_ENCHANTMENTLOG, (8+8+4+4+1)); // last check 2.0.10
data << uint64(Target);
@@ -1004,7 +1004,7 @@ void WorldSession::SendEnchantmentLog(uint64 Target, uint64 Caster,uint32 ItemID
SendPacket(&data);
}
void WorldSession::SendItemEnchantTimeUpdate(uint64 Playerguid, uint64 Itemguid,uint32 slot,uint32 Duration)
void WorldSession::SendItemEnchantTimeUpdate(uint64 Playerguid, uint64 Itemguid, uint32 slot, uint32 Duration)
{
// last check 2.0.10
WorldPacket data(SMSG_ITEM_ENCHANT_TIME_UPDATE, (8+4+4+8));
@@ -1315,21 +1315,21 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
{
if (GemEnchants[i])
{
itemTarget->SetEnchantment(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT+i), GemEnchants[i],0,0);
itemTarget->SetEnchantment(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT+i), GemEnchants[i], 0, 0);
if (Item* guidItem = _player->GetItemByGuid(gem_guids[i]))
_player->DestroyItem(guidItem->GetBagSlot(), guidItem->GetSlot(), true);
}
}
for (uint32 enchant_slot = SOCK_ENCHANTMENT_SLOT; enchant_slot < SOCK_ENCHANTMENT_SLOT+MAX_GEM_SOCKETS; ++enchant_slot)
_player->ApplyEnchantment(itemTarget,EnchantmentSlot(enchant_slot),true);
_player->ApplyEnchantment(itemTarget, EnchantmentSlot(enchant_slot), true);
bool SocketBonusToBeActivated = itemTarget->GemsFitSockets();//current socketbonus state
if (SocketBonusActivated ^ SocketBonusToBeActivated) //if there was a change...
{
_player->ApplyEnchantment(itemTarget,BONUS_ENCHANTMENT_SLOT,false);
_player->ApplyEnchantment(itemTarget, BONUS_ENCHANTMENT_SLOT, false);
itemTarget->SetEnchantment(BONUS_ENCHANTMENT_SLOT, (SocketBonusToBeActivated ? itemTarget->GetTemplate()->socketBonus : 0), 0, 0);
_player->ApplyEnchantment(itemTarget,BONUS_ENCHANTMENT_SLOT,true);
_player->ApplyEnchantment(itemTarget, BONUS_ENCHANTMENT_SLOT, true);
//it is not displayed, client has an inbuilt system to determine if the bonus is activated
}
@@ -1347,7 +1347,7 @@ void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data)
recv_data >> eslot;
// apply only to equipped item
if (!Player::IsEquipmentPos(INVENTORY_SLOT_BAG_0,eslot))
if (!Player::IsEquipmentPos(INVENTORY_SLOT_BAG_0, eslot))
return;
Item* item = GetPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, eslot);
@@ -1358,7 +1358,7 @@ void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data)
if (!item->GetEnchantmentId(TEMP_ENCHANTMENT_SLOT))
return;
GetPlayer()->ApplyEnchantment(item,TEMP_ENCHANTMENT_SLOT,false);
GetPlayer()->ApplyEnchantment(item, TEMP_ENCHANTMENT_SLOT, false);
item->ClearEnchantment(TEMP_ENCHANTMENT_SLOT);
}
@@ -45,7 +45,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data)
GameObject *go = player->GetMap()->GetGameObject(lguid);
// not check distance for GO in case owned GO (fishing bobber case, for example) or Fishing hole GO
if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player,INTERACTION_DISTANCE)))
if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player, INTERACTION_DISTANCE)))
{
player->SendLootRelease(lguid);
return;
@@ -82,7 +82,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data)
bool ok_loot = pCreature && pCreature->isAlive() == (player->getClass() == CLASS_ROGUE && pCreature->lootForPickPocketed);
if (!ok_loot || !pCreature->IsWithinDistInMap(_player,INTERACTION_DISTANCE))
if (!ok_loot || !pCreature->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
{
player->SendLootRelease(lguid);
return;
@@ -112,7 +112,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/)
GameObject *pGameObject = GetPlayer()->GetMap()->GetGameObject(guid);
// not check distance for GO in case owned GO (fishing bobber case, for example)
if (pGameObject && ((pGameObject->GetOwnerGUID() == _player->GetGUID() || pGameObject->IsWithinDistInMap(_player,INTERACTION_DISTANCE))))
if (pGameObject && ((pGameObject->GetOwnerGUID() == _player->GetGUID() || pGameObject->IsWithinDistInMap(_player, INTERACTION_DISTANCE))))
pLoot = &pGameObject->loot;
break;
@@ -121,7 +121,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/)
{
Corpse *bones = ObjectAccessor::GetCorpse(*GetPlayer(), guid);
if (bones && bones->IsWithinDistInMap(_player,INTERACTION_DISTANCE))
if (bones && bones->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
pLoot = &bones->loot;
break;
@@ -138,7 +138,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/)
bool ok_loot = pCreature && pCreature->isAlive() == (player->getClass() == CLASS_ROGUE && pCreature->lootForPickPocketed);
if (ok_loot && pCreature->IsWithinDistInMap(_player,INTERACTION_DISTANCE))
if (ok_loot && pCreature->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
pLoot = &pCreature->loot ;
break;
@@ -159,7 +159,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/)
Player* playerGroup = itr->getSource();
if (!playerGroup)
continue;
if (player->IsWithinDistInMap(playerGroup,sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE),false))
if (player->IsWithinDistInMap(playerGroup, sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE), false))
playersNear.push_back(playerGroup);
}
@@ -233,7 +233,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
GameObject *go = GetPlayer()->GetMap()->GetGameObject(lguid);
// not check distance for GO in case owned GO (fishing bobber case, for example) or Fishing hole GO
if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player,INTERACTION_DISTANCE)))
if (!go || ((go->GetOwnerGUID() != _player->GetGUID() && go->GetGoType() != GAMEOBJECT_TYPE_FISHINGHOLE) && !go->IsWithinDistInMap(_player, INTERACTION_DISTANCE)))
return;
loot = &go->loot;
@@ -272,7 +272,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
if (lockInfo)
ReqValue = lockInfo->Skill[0];
float skill = float(player->GetSkillValue(SKILL_MINING))/(ReqValue+25);
double chance = pow(0.8*chance_rate,4*(1/double(max_amount))*double(uses));
double chance = pow(0.8*chance_rate, 4*(1/double(max_amount))*double(uses));
if (roll_chance_f((float)(100*chance+skill)))
{
go->SetLootState(GO_READY);
@@ -327,7 +327,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
else if (IS_CORPSE_GUID(lguid)) // ONLY remove insignia at BG
{
Corpse *corpse = ObjectAccessor::GetCorpse(*player, lguid);
if (!corpse || !corpse->IsWithinDistInMap(_player,INTERACTION_DISTANCE))
if (!corpse || !corpse->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
return;
loot = &corpse->loot;
@@ -362,7 +362,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
}
else
// FIXME: item must not be deleted in case not fully looted state. But this pre-request implement loot saving in DB at item save. Or cheating possible.
player->DestroyItem(pItem->GetBagSlot(),pItem->GetSlot(), true);
player->DestroyItem(pItem->GetBagSlot(), pItem->GetSlot(), true);
return; // item can be looted only single player
}
else
@@ -370,7 +370,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
Creature* pCreature = GetPlayer()->GetMap()->GetCreature(lguid);
bool ok_loot = pCreature && pCreature->isAlive() == (player->getClass() == CLASS_ROGUE && pCreature->lootForPickPocketed);
if (!ok_loot || !pCreature->IsWithinDistInMap(_player,INTERACTION_DISTANCE))
if (!ok_loot || !pCreature->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
return;
loot = &pCreature->loot;
@@ -455,7 +455,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data)
if (slotid > pLoot->items.size())
{
sLog->outDebug(LOG_FILTER_LOOT, "MasterLootItem: Player %s might be using a hack! (slot %d, size %lu)",GetPlayer()->GetName(), slotid, (unsigned long)pLoot->items.size());
sLog->outDebug(LOG_FILTER_LOOT, "MasterLootItem: Player %s might be using a hack! (slot %d, size %lu)", GetPlayer()->GetName(), slotid, (unsigned long)pLoot->items.size());
return;
}
@@ -272,7 +272,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
if (money > 0 && GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
{
sLog->outCommand(GetAccountId(),"GM %s (Account: %u) mail money: %u to player: %s (Account: %u)",
sLog->outCommand(GetAccountId(), "GM %s (Account: %u) mail money: %u to player: %s (Account: %u)",
GetPlayerName(), GetAccountId(), money, receiver.c_str(), rc_account);
}
}
@@ -456,11 +456,11 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
// can be calculated early
sender_accId = sObjectMgr->GetPlayerAccountIdByGUID(sender_guid);
if (!sObjectMgr->GetPlayerNameByGUID(sender_guid,sender_name))
if (!sObjectMgr->GetPlayerNameByGUID(sender_guid, sender_name))
sender_name = sObjectMgr->GetTrinityStringForDBCLocale(LANG_UNKNOWN);
}
sLog->outCommand(GetAccountId(),"GM %s (Account: %u) receive mail item: %s (Entry: %u Count: %u) and send COD money: %u to player: %s (Account: %u)",
GetPlayerName(),GetAccountId(),it->GetTemplate()->Name1.c_str(), it->GetEntry(),it->GetCount(),m->COD,sender_name.c_str(),sender_accId);
sLog->outCommand(GetAccountId(), "GM %s (Account: %u) receive mail item: %s (Entry: %u Count: %u) and send COD money: %u to player: %s (Account: %u)",
GetPlayerName(), GetAccountId(), it->GetTemplate()->Name1.c_str(), it->GetEntry(), it->GetCount(), m->COD, sender_name.c_str(), sender_accId);
}
else if (!receive)
sender_accId = sObjectMgr->GetPlayerAccountIdByGUID(sender_guid);
@@ -481,7 +481,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
pl->RemoveMItem(it->GetGUIDLow());
uint32 count = it->GetCount(); // save counts before store and possible merge with deleting
pl->MoveItemToInventory(dest,it,true);
pl->MoveItemToInventory(dest, it, true);
pl->SaveInventoryAndGoldToDB(trans);
pl->_SaveMail(trans);
@@ -694,7 +694,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
bodyItem->SetUInt32Value(ITEM_FIELD_CREATOR, m->sender);
bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_MAIL_TEXT_MASK);
sLog->outDetail("HandleMailCreateTextItem mailid=%u",mailId);
sLog->outDetail("HandleMailCreateTextItem mailid=%u", mailId);
ItemPosCountVec dest;
uint8 msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, dest, bodyItem, false);
@@ -71,7 +71,7 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data)
}
//this is spirit release confirm?
GetPlayer()->RemovePet(NULL,PET_SAVE_NOT_IN_SLOT, true);
GetPlayer()->RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
GetPlayer()->BuildPlayerRepop();
GetPlayer()->RepopAtGraveyard();
}
@@ -205,7 +205,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
std::string temp;
recv_data >> temp; // user entered string, it used as universal search pattern(guild+player name)?
if (!Utf8toWStr(temp,str[i]))
if (!Utf8toWStr(temp, str[i]))
continue;
wstrToLower(str[i]);
@@ -292,7 +292,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
std::string pname = itr->second->GetName();
std::wstring wpname;
if (!Utf8toWStr(pname,wpname))
if (!Utf8toWStr(pname, wpname))
continue;
wstrToLower(wpname);
@@ -301,7 +301,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
std::string gname = sObjectMgr->GetGuildNameById(itr->second->GetGuildId());
std::wstring wgname;
if (!Utf8toWStr(gname,wgname))
if (!Utf8toWStr(gname, wgname))
continue;
wstrToLower(wgname);
@@ -483,9 +483,9 @@ void WorldSession::HandleZoneUpdateOpcode(WorldPacket & recv_data)
// use server size data
uint32 newzone, newarea;
GetPlayer()->GetZoneAndAreaId(newzone,newarea);
GetPlayer()->UpdateZone(newzone,newarea);
//GetPlayer()->SendInitWorldStates(true,newZone);
GetPlayer()->GetZoneAndAreaId(newzone, newarea);
GetPlayer()->UpdateZone(newzone, newarea);
//GetPlayer()->SendInitWorldStates(true, newZone);
}
void WorldSession::HandleSetTargetOpcode(WorldPacket & recv_data)
@@ -729,7 +729,7 @@ void WorldSession::HandleBugOpcode(WorldPacket & recv_data)
CharacterDatabase.escape_string(type);
CharacterDatabase.escape_string(content);
CharacterDatabase.PExecute ("INSERT INTO bugreport (type,content) VALUES('%s', '%s')", type.c_str(), content.c_str());
CharacterDatabase.PExecute ("INSERT INTO bugreport (type, content) VALUES('%s', '%s')", type.c_str(), content.c_str());
}
void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
@@ -817,18 +817,18 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
uint32 Trigger_ID;
recv_data >> Trigger_ID;
sLog->outDebug(LOG_FILTER_NETWORKIO, "Trigger ID:%u",Trigger_ID);
sLog->outDebug(LOG_FILTER_NETWORKIO, "Trigger ID:%u", Trigger_ID);
if (GetPlayer()->isInFlight())
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow(), Trigger_ID);
sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore Area Trigger ID:%u", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), Trigger_ID);
return;
}
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID);
if (!atEntry)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow(), Trigger_ID);
sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), Trigger_ID);
return;
}
@@ -846,7 +846,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
if (atEntry->radius > 0)
{
// if we have radius check it
float dist = pl->GetDistance(atEntry->x,atEntry->y,atEntry->z);
float dist = pl->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",
@@ -946,7 +946,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
if (GetPlayer()->GetGroup() && GetPlayer()->GetGroup()->isLFGGroup() && GetPlayer()->GetMap()->IsDungeon() && at->target_mapId != GetPlayer()->GetMapId())
GetPlayer()->TeleportToBGEntryPoint();
else
GetPlayer()->TeleportTo(at->target_mapId,at->target_X,at->target_Y,at->target_Z,at->target_Orientation,TELE_TO_NOT_LEAVE_TRANSPORT);
GetPlayer()->TeleportTo(at->target_mapId, at->target_X, at->target_Y, at->target_Z, at->target_Orientation, TELE_TO_NOT_LEAVE_TRANSPORT);
}
void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data)
@@ -1183,7 +1183,7 @@ void WorldSession::HandleSetActionBarToggles(WorldPacket& recv_data)
if (!GetPlayer()) // ignore until not logged (check needed because STATUS_AUTHED)
{
if (ActionBar != 0)
sLog->outError("WorldSession::HandleSetActionBarToggles in not logged state with value: %u, ignored",uint32(ActionBar));
sLog->outError("WorldSession::HandleSetActionBarToggles in not logged state with value: %u, ignored", uint32(ActionBar));
return;
}
@@ -1196,7 +1196,7 @@ void WorldSession::HandleWardenDataOpcode(WorldPacket& recv_data)
/*
uint8 tmp;
recv_data >> tmp;
sLog->outDebug("Received opcode CMSG_WARDEN_DATA, not resolve.uint8 = %u",tmp);
sLog->outDebug("Received opcode CMSG_WARDEN_DATA, not resolve.uint8 = %u", tmp);
*/
}
@@ -1290,14 +1290,14 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data)
//sLog->outDebug("Received opcode CMSG_WORLD_TELEPORT");
if (GetPlayer()->isInFlight())
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore worldport command.",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow());
sLog->outDebug(LOG_FILTER_NETWORKIO, "Player '%s' (GUID: %u) in flight, ignore worldport command.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
return;
}
sLog->outStaticDebug("Time %u sec, map=%u, x=%f, y=%f, z=%f, orient=%f", time/1000, mapid, PositionX, PositionY, PositionZ, Orientation);
if (GetSecurity() >= SEC_ADMINISTRATOR)
GetPlayer()->TeleportTo(mapid,PositionX,PositionY,PositionZ,Orientation);
GetPlayer()->TeleportTo(mapid, PositionX, PositionY, PositionZ, Orientation);
else
SendNotification(LANG_YOU_NOT_HAVE_PERMISSION);
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received worldport command from player %s", GetPlayer()->GetName());
@@ -1331,7 +1331,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
uint32 accid = plr->GetSession()->GetAccountId();
QueryResult result = LoginDatabase.PQuery("SELECT username,email,last_ip FROM account WHERE id=%u", accid);
QueryResult result = LoginDatabase.PQuery("SELECT username, email, last_ip FROM account WHERE id=%u", accid);
if (!result)
{
SendNotification(LANG_ACCOUNT_FOR_PLAYER_NOT_FOUND, charname.c_str());
@@ -1496,7 +1496,7 @@ void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/)
if (pGroup->IsLeader(_player->GetGUID()))
{
pGroup->ResetInstances(INSTANCE_RESET_ALL, false, _player);
pGroup->ResetInstances(INSTANCE_RESET_ALL, true,_player);
pGroup->ResetInstances(INSTANCE_RESET_ALL, true, _player);
}
}
else
@@ -141,7 +141,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
{
if (mEntry->IsDungeon())
{
GetPlayer()->ResurrectPlayer(0.5f,false);
GetPlayer()->ResurrectPlayer(0.5f, false);
GetPlayer()->SpawnCorpseBones();
}
}
@@ -178,7 +178,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
// in friendly area
else if (GetPlayer()->IsPvP() && !GetPlayer()->HasFlag(PLAYER_FLAGS,PLAYER_FLAGS_IN_PVP))
else if (GetPlayer()->IsPvP() && !GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP))
GetPlayer()->UpdatePvP(false, false);
// resummon pet
@@ -215,7 +215,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
WorldLocation const& dest = plMover->GetTeleportDest();
plMover->SetPosition(dest,true);
plMover->SetPosition(dest, true);
uint32 newzone, newarea;
plMover->GetZoneAndAreaId(newzone, newarea);
@@ -229,7 +229,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
plMover->CastSpell(plMover, 2479, true);
// in friendly area
else if (plMover->IsPvP() && !plMover->HasFlag(PLAYER_FLAGS,PLAYER_FLAGS_IN_PVP))
else if (plMover->IsPvP() && !plMover->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_IN_PVP))
plMover->UpdatePvP(false, false);
}
@@ -459,12 +459,12 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
{
sLog->outError("%sSpeedChange player %s is NOT correct (must be %f instead %f), force set to correct value",
move_type_name[move_type], _player->GetName(), _player->GetSpeed(move_type), newspeed);
_player->SetSpeed(move_type,_player->GetSpeedRate(move_type),true);
_player->SetSpeed(move_type, _player->GetSpeedRate(move_type), true);
}
else // must be lesser - cheating
{
sLog->outBasic("Player %s from account id %u kicked for incorrect speed (must be %f instead %f)",
_player->GetName(),_player->GetSession()->GetAccountId(),_player->GetSpeed(move_type), newspeed);
_player->GetName(), _player->GetSession()->GetAccountId(), _player->GetSpeed(move_type), newspeed);
_player->GetSession()->KickPlayer();
}
}
@@ -51,7 +51,7 @@ void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TABARDDESIGNER);
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TABARDDESIGNER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTabardVendorActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
@@ -80,7 +80,7 @@ void WorldSession::HandleBankerActivateOpcode(WorldPacket & recv_data)
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_BANKER);
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleBankerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
@@ -119,7 +119,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList");
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TRAINER);
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
@@ -131,14 +131,14 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
// trainer list loaded at check;
if (!unit->isCanTrainingOf(_player,true))
if (!unit->isCanTrainingOf(_player, true))
return;
CreatureTemplate const *ci = unit->GetCreatureInfo();
if (!ci)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - (GUID: %u) NO CREATUREINFO!",GUID_LOPART(guid));
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: SendTrainerList - (GUID: %u) NO CREATUREINFO!", GUID_LOPART(guid));
return;
}
@@ -231,7 +231,7 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
data << strTitle;
data.put<uint32>(count_pos,count);
data.put<uint32>(count_pos, count);
SendPacket(&data);
}
@@ -241,7 +241,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data)
uint32 spellId = 0;
recv_data >> guid >> spellId;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TRAINER_BUY_SPELL NpcGUID=%u, learn spell id is: %u",uint32(GUID_LOPART(guid)), spellId);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TRAINER_BUY_SPELL NpcGUID=%u, learn spell id is: %u", uint32(GUID_LOPART(guid)), spellId);
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
@@ -254,7 +254,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data)
if (GetPlayer()->HasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
if (!unit->isCanTrainingOf(_player,true))
if (!unit->isCanTrainingOf(_player, true))
return;
// check present spell in trainer spell list
@@ -292,7 +292,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data)
// learn explicitly or cast explicitly
if (trainer_spell->IsCastable())
_player->CastSpell(_player,trainer_spell->spell,true);
_player->CastSpell(_player, trainer_spell->spell, true);
else
_player->learnSpell(spellId, false);
@@ -414,7 +414,7 @@ void WorldSession::SendSpiritResurrect()
{
_player->ResurrectPlayer(0.5f, true);
_player->DurabilityLossAll(0.25f,true);
_player->DurabilityLossAll(0.25f, true);
// get corpse nearest graveyard
WorldSafeLocsEntry const *corpseGrave = NULL;
@@ -451,7 +451,7 @@ void WorldSession::HandleBinderActivateOpcode(WorldPacket & recv_data)
if (!GetPlayer()->IsInWorld() || !GetPlayer()->isAlive())
return;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID,UNIT_NPC_FLAG_INNKEEPER);
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_INNKEEPER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleBinderActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID)));
@@ -557,7 +557,7 @@ void WorldSession::SendStablePetCallback(QueryResult result, uint64 guid)
data << uint32(pet->GetEntry());
data << uint32(pet->getLevel());
data << pet->GetName(); // petname
data << uint8(1); // 1 = current, 2/3 = in stable (any from 4,5,... create problems with proper show)
data << uint8(1); // 1 = current, 2/3 = in stable (any from 4, 5, ... create problems with proper show)
++num;
}
@@ -571,7 +571,7 @@ void WorldSession::SendStablePetCallback(QueryResult result, uint64 guid)
data << uint32(fields[2].GetUInt32()); // creature entry
data << uint32(fields[3].GetUInt16()); // level
data << fields[4].GetString(); // name
data << uint8(2); // 1 = current, 2/3 = in stable (any from 4,5,... create problems with proper show)
data << uint8(2); // 1 = current, 2/3 = in stable (any from 4, 5, ... create problems with proper show)
++num;
}
@@ -622,8 +622,8 @@ void WorldSession::HandleStablePet(WorldPacket & recv_data)
return;
}
m_stablePetCallback = CharacterDatabase.AsyncPQuery("SELECT owner,slot,id FROM character_pet WHERE owner = '%u' AND slot >= '%u' AND slot <= '%u' ORDER BY slot ",
_player->GetGUIDLow(),PET_SAVE_FIRST_STABLE_SLOT,PET_SAVE_LAST_STABLE_SLOT);
m_stablePetCallback = CharacterDatabase.AsyncPQuery("SELECT owner, slot, id FROM character_pet WHERE owner = '%u' AND slot >= '%u' AND slot <= '%u' ORDER BY slot ",
_player->GetGUIDLow(), PET_SAVE_FIRST_STABLE_SLOT, PET_SAVE_LAST_STABLE_SLOT);
}
@@ -724,10 +724,10 @@ void WorldSession::HandleUnstablePetCallback(QueryResult result, uint32 petnumbe
// delete dead pet
if (pet)
_player->RemovePet(pet,PET_SAVE_AS_DELETED);
_player->RemovePet(pet, PET_SAVE_AS_DELETED);
Pet *newpet = new Pet(_player, HUNTER_PET);
if (!newpet->LoadPetFromDB(_player,creature_id,petnumber))
if (!newpet->LoadPetFromDB(_player, creature_id, petnumber))
{
delete newpet;
newpet = NULL;
@@ -805,7 +805,7 @@ void WorldSession::HandleStableSwapPet(WorldPacket & recv_data)
// find swapped pet slot in stable
m_stableSwapCallback.SetParam(pet_number);
m_stableSwapCallback.SetFutureResult(
CharacterDatabase.PQuery("SELECT slot,entry FROM character_pet WHERE owner = '%u' AND id = '%u'",
CharacterDatabase.PQuery("SELECT slot, entry FROM character_pet WHERE owner = '%u' AND id = '%u'",
_player->GetGUIDLow(), pet_number)
);
}
@@ -850,7 +850,7 @@ void WorldSession::HandleStableSwapPetCallback(QueryResult result, uint32 petnum
// summon unstabled pet
Pet *newpet = new Pet(_player);
if (!newpet->LoadPetFromDB(_player,creature_id, petnumber))
if (!newpet->LoadPetFromDB(_player, creature_id, petnumber))
{
delete newpet;
SendStableResult(STABLE_ERR_STABLE);
@@ -166,7 +166,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
case COMMAND_FOLLOW: //spellid=1792 //FOLLOW
pet->AttackStop();
pet->InterruptNonMeleeSpells(false);
pet->GetMotionMaster()->MoveFollow(_player,PET_FOLLOW_DIST,pet->GetFollowAngle());
pet->GetMotionMaster()->MoveFollow(_player, PET_FOLLOW_DIST, pet->GetFollowAngle());
charmInfo->SetCommandState(COMMAND_FOLLOW);
charmInfo->SetIsCommandAttack(false);
@@ -235,7 +235,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
charmInfo->SetIsFollowing(false);
charmInfo->SetIsReturning(false);
pet->Attack(TargetUnit,true);
pet->Attack(TargetUnit, true);
pet->SendPetAIReaction(guid1);
}
}
@@ -285,7 +285,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
Unit* unit_target = NULL;
if (guid2)
unit_target = ObjectAccessor::GetUnit(*_player,guid2);
unit_target = ObjectAccessor::GetUnit(*_player, guid2);
// do not cast unknown spells
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellid);
@@ -377,7 +377,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
else
{
if (pet->isPossessed() || pet->IsVehicle())
Spell::SendCastResult(GetPlayer(),spellInfo,0,result);
Spell::SendCastResult(GetPlayer(), spellInfo, 0, result);
else
pet->SendPetCastFail(spellid, result);
@@ -408,7 +408,7 @@ void WorldSession::HandlePetNameQuery(WorldPacket & recv_data)
recv_data >> petnumber;
recv_data >> petguid;
SendPetNameQuery(petguid,petnumber);
SendPetNameQuery(petguid, petnumber);
}
void WorldSession::SendPetNameQuery(uint64 petguid, uint32 petnumber)
@@ -572,7 +572,7 @@ void WorldSession::HandlePetSetAction(WorldPacket & recv_data)
}
charmInfo->SetActionBar(position[i],spell_id,ActiveStates(act_state));
charmInfo->SetActionBar(position[i], spell_id, ActiveStates(act_state));
}
}
}
@@ -628,7 +628,7 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data)
std::wstring wname;
Utf8toWStr(name, wname);
if (!ObjectMgr::CheckDeclinedNames(GetMainPartOfName(wname,0),declinedname))
if (!ObjectMgr::CheckDeclinedNames(GetMainPartOfName(wname, 0), declinedname))
{
SendPetNameInvalid(PET_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME, name, &declinedname);
return;
@@ -641,7 +641,7 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data)
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
CharacterDatabase.escape_string(declinedname.name[i]);
trans->PAppend("DELETE FROM character_pet_declinedname WHERE owner = '%u' AND id = '%u'", _player->GetGUIDLow(), pet->GetCharmInfo()->GetPetNumber());
trans->PAppend("INSERT INTO character_pet_declinedname (id, owner, genitive, dative, accusative, instrumental, prepositional) VALUES ('%u','%u','%s','%s','%s','%s','%s')",
trans->PAppend("INSERT INTO character_pet_declinedname (id, owner, genitive, dative, accusative, instrumental, prepositional) VALUES ('%u', '%u', '%s', '%s', '%s', '%s', '%s')",
pet->GetCharmInfo()->GetPetNumber(), _player->GetGUIDLow(), declinedname.name[0].c_str(), declinedname.name[1].c_str(), declinedname.name[2].c_str(), declinedname.name[3].c_str(), declinedname.name[4].c_str());
}
@@ -670,10 +670,10 @@ void WorldSession::HandlePetAbandon(WorldPacket & recv_data)
if (pet->GetGUID() == _player->GetPetGUID())
{
uint32 feelty = pet->GetPower(POWER_HAPPINESS);
pet->SetPower(POWER_HAPPINESS ,(feelty-50000) > 0 ?(feelty-50000) : 0);
pet->SetPower(POWER_HAPPINESS , (feelty-50000) > 0 ?(feelty-50000) : 0);
}
_player->RemovePet((Pet*)pet,PET_SAVE_AS_DELETED);
_player->RemovePet((Pet*)pet, PET_SAVE_AS_DELETED);
}
else if (pet->GetGUID() == _player->GetCharmGUID())
_player->StopCastingCharm();
@@ -694,11 +694,11 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
if (ObjectAccessor::FindPlayer(guid))
return;
Creature* pet=ObjectAccessor::GetCreatureOrPetOrVehicle(*_player,guid);
Creature* pet=ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (!pet || (pet != _player->GetGuardianPet() && pet != _player->GetCharm()))
{
sLog->outError("HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName());
sLog->outError("HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)), GetPlayer()->GetName());
return;
}
@@ -718,7 +718,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
else
pet->GetCharmInfo()->ToggleCreatureAutocast(spellid, state);
charmInfo->SetSpellAutocast(spellid,state);
charmInfo->SetSpellAutocast(spellid, state);
}
void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
@@ -742,7 +742,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
if (!caster || (caster != _player->GetGuardianPet() && caster != _player->GetCharm()))
{
sLog->outError("HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName());
sLog->outError("HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)), GetPlayer()->GetName());
return;
}
@@ -89,7 +89,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
sLog->outDebug(LOG_FILTER_NETWORKIO, "Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str());
// prevent cheating
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guidNPC,UNIT_NPC_FLAG_PETITIONER);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guidNPC, UNIT_NPC_FLAG_PETITIONER);
if (!pCreature)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC));
@@ -544,9 +544,9 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
return;
}
CharacterDatabase.PExecute("INSERT INTO petition_sign (ownerguid,petitionguid, playerguid, player_account) VALUES ('%u', '%u', '%u','%u')", GUID_LOPART(ownerguid),GUID_LOPART(petitionguid), plguidlo,GetAccountId());
CharacterDatabase.PExecute("INSERT INTO petition_sign (ownerguid, petitionguid, playerguid, player_account) VALUES ('%u', '%u', '%u', '%u')", GUID_LOPART(ownerguid), GUID_LOPART(petitionguid), plguidlo, GetAccountId());
sLog->outDebug(LOG_FILTER_NETWORKIO, "PETITION SIGN: GUID %u by player: %s (GUID: %u Account: %u)", GUID_LOPART(petitionguid), _player->GetName(),plguidlo,GetAccountId());
sLog->outDebug(LOG_FILTER_NETWORKIO, "PETITION SIGN: GUID %u by player: %s (GUID: %u Account: %u)", GUID_LOPART(petitionguid), _player->GetName(), plguidlo, GetAccountId());
WorldPacket data(SMSG_PETITION_SIGN_RESULTS, (8+8+4));
data << uint64(petitionguid);
@@ -807,7 +807,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
// Proceed with guild/arena team creation
// Delete charter item
_player->DestroyItem(item->GetBagSlot(),item->GetSlot(), true);
_player->DestroyItem(item->GetBagSlot(), item->GetSlot(), true);
if (type == GUILD_CHARTER_TYPE)
{
@@ -43,10 +43,10 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data)
uint8 questStatus = DIALOG_STATUS_NONE;
uint8 defstatus = DIALOG_STATUS_NONE;
Object* questgiver = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
Object* questgiver = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
if (!questgiver)
{
sLog->outDetail("Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver (Typeid: %u GUID: %u)",GuidHigh2TypeId(GUID_HIPART(guid)),GUID_LOPART(guid));
sLog->outDetail("Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver (Typeid: %u GUID: %u)", GuidHigh2TypeId(GUID_HIPART(guid)), GUID_LOPART(guid));
return;
}
@@ -54,7 +54,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data)
{
case TYPEID_UNIT:
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc, guid = %u",uint32(GUID_LOPART(guid)));
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc, guid = %u", uint32(GUID_LOPART(guid)));
Creature* cr_questgiver=questgiver->ToCreature();
if (!cr_questgiver->IsHostileTo(_player)) // not show quest status to enemies
{
@@ -66,7 +66,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data)
}
case TYPEID_GAMEOBJECT:
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject guid = %u",uint32(GUID_LOPART(guid)));
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject guid = %u", uint32(GUID_LOPART(guid)));
GameObject* go_questgiver=(GameObject*)questgiver;
questStatus = sScriptMgr->GetDialogStatus(_player, go_questgiver);
if (questStatus > 6)
@@ -89,7 +89,7 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data)
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_HELLO npc = %u", GUID_LOPART(guid));
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_NONE);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!pCreature)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleQuestgiverHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.",
@@ -124,7 +124,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data)
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1);
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM|TYPEMASK_PLAYER);
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM|TYPEMASK_PLAYER);
// no or incorrect quest giver
if (!pObject || (pObject->GetTypeId() != TYPEID_PLAYER && !pObject->hasQuest(quest)) ||
@@ -139,7 +139,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data)
if (qInfo)
{
// prevent cheating
if (!GetPlayer()->CanTakeQuest(qInfo,true))
if (!GetPlayer()->CanTakeQuest(qInfo, true))
{
_player->PlayerTalkClass->CloseGossip();
_player->SetDivider(0);
@@ -210,7 +210,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data)
}
if (destroyItem)
_player->DestroyItem(((Item*)pObject)->GetBagSlot(), ((Item*)pObject)->GetSlot(),true);
_player->DestroyItem(((Item*)pObject)->GetBagSlot(), ((Item*)pObject)->GetSlot(), true);
break;
}
@@ -242,7 +242,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data)
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1);
// Verify that the guid is valid and is a questgiver or involved in the requested quest
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM);
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM);
if (!pObject || (!pObject->hasQuest(quest) && !pObject->hasInvolvedQuest(quest)))
{
_player->PlayerTalkClass->CloseGossip();
@@ -273,7 +273,7 @@ void WorldSession::HandleQuestQueryOpcode(WorldPacket & recv_data)
uint32 quest;
recv_data >> quest;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUEST_QUERY quest = %u",quest);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUEST_QUERY quest = %u", quest);
Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest);
if (pQuest)
@@ -297,9 +297,9 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
if (!GetPlayer()->isAlive())
return;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %u, quest = %u, reward = %u",uint32(GUID_LOPART(guid)),quest,reward);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %u, quest = %u, reward = %u", uint32(GUID_LOPART(guid)), quest, reward);
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
if (!pObject)
return;
@@ -319,8 +319,8 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
if (!(sScriptMgr->OnQuestReward(_player, (pObject->ToCreature()), pQuest, reward)))
{
// Send next quest
if (Quest const* nextquest = _player->GetNextQuest(guid ,pQuest))
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest,guid,true);
if (Quest const* nextquest = _player->GetNextQuest(guid , pQuest))
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest, guid, true);
(pObject->ToCreature())->AI()->sQuestReward(_player, pQuest, reward);
}
@@ -329,8 +329,8 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
if (!sScriptMgr->OnQuestReward(_player, ((GameObject*)pObject), pQuest, reward))
{
// Send next quest
if (Quest const* nextquest = _player->GetNextQuest(guid ,pQuest))
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest,guid,true);
if (Quest const* nextquest = _player->GetNextQuest(guid , pQuest))
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest, guid, true);
pObject->ToGameObject()->AI()->QuestReward(_player, pQuest, reward);
}
break;
@@ -352,9 +352,9 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recv_data)
if (!GetPlayer()->isAlive())
return;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %u, quest = %u", uint32(GUID_LOPART(guid)), quest);
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
if (!pObject||!pObject->hasInvolvedQuest(quest))
return;
@@ -385,7 +385,7 @@ void WorldSession::HandleQuestLogSwapQuest(WorldPacket& recv_data)
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTLOG_SWAP_QUEST slot 1 = %u, slot 2 = %u", slot1, slot2);
GetPlayer()->SwapQuestSlot(slot1,slot2);
GetPlayer()->SwapQuestSlot(slot1, slot2);
}
void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data)
@@ -393,7 +393,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data)
uint8 slot;
recv_data >> slot;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u",slot);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u", slot);
if (slot < MAX_QUEST_LOG_SIZE)
{
@@ -465,7 +465,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
if (!_player->isAlive())
return;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u", uint32(GUID_LOPART(guid)), quest);
Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest);
if (pQuest)
@@ -487,12 +487,12 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
if (pQuest->IsRepeatable())
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanCompleteRepeatableQuest(pQuest), false);
else
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanRewardQuest(pQuest,false), false);
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanRewardQuest(pQuest, false), false);
}
else
{
if (pQuest->GetReqItemsCount()) // some items required
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanRewardQuest(pQuest,false), false);
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanRewardQuest(pQuest, false), false);
else // no items required
_player->PlayerTalkClass->SendQuestGiverOfferReward(pQuest, guid, true);
}
@@ -697,7 +697,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket
if (IS_CRE_OR_VEH_OR_PET_GUID(*itr))
{
// need also pet quests case support
Creature *questgiver = ObjectAccessor::GetCreatureOrPetOrVehicle(*GetPlayer(),*itr);
Creature *questgiver = ObjectAccessor::GetCreatureOrPetOrVehicle(*GetPlayer(), *itr);
if (!questgiver || questgiver->IsHostileTo(_player))
continue;
if (!questgiver->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER))
@@ -60,7 +60,7 @@ void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TRAINER);
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
@@ -138,7 +138,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
{
if (IsNonCombatSpell(spellInfo))
{
pUser->SendEquipError(EQUIP_ERR_NOT_IN_COMBAT,pItem,NULL);
pUser->SendEquipError(EQUIP_ERR_NOT_IN_COMBAT, pItem, NULL);
return;
}
}
@@ -169,19 +169,19 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
{
// for implicit area/coord target spells
if (!targets.getUnitTarget())
Spell::SendCastResult(_player,spellInfo,castCount,SPELL_FAILED_NO_VALID_TARGETS);
Spell::SendCastResult(_player, spellInfo, castCount, SPELL_FAILED_NO_VALID_TARGETS);
// for explicit target spells
else
Spell::SendCastResult(_player,spellInfo,castCount,SPELL_FAILED_BAD_TARGETS);
Spell::SendCastResult(_player, spellInfo, castCount, SPELL_FAILED_BAD_TARGETS);
}
return;
}
// Note: If script stop casting it must send appropriate data to client to prevent stuck item in gray state.
if (!sScriptMgr->OnItemUse(pUser,pItem,targets))
if (!sScriptMgr->OnItemUse(pUser, pItem, targets))
{
// no script or script not process request by self
pUser->CastItemUseSpell(pItem,targets,castCount,glyphIndex);
pUser->CastItemUseSpell(pItem, targets, castCount, glyphIndex);
}
}
@@ -193,7 +193,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
{
sLog->outDetail("WORLD: CMSG_OPEN_ITEM packet, data length = %i",(uint32)recvPacket.size());
sLog->outDetail("WORLD: CMSG_OPEN_ITEM packet, data length = %i", (uint32)recvPacket.size());
Player* pUser = _player;
@@ -205,7 +205,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
recvPacket >> bagIndex >> slot;
sLog->outDetail("bagIndex: %u, slot: %u",bagIndex,slot);
sLog->outDetail("bagIndex: %u, slot: %u", bagIndex, slot);
Item *pItem = pUser->GetItemByPos(bagIndex, slot);
if (!pItem)
@@ -274,7 +274,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
CharacterDatabase.PExecute("DELETE FROM character_gifts WHERE item_guid = '%u'", pItem->GetGUIDLow());
}
else
pUser->SendLoot(pItem->GetGUID(),LOOT_CORPSE);
pUser->SendLoot(pItem->GetGUID(), LOOT_CORPSE);
}
void WorldSession::HandleGameObjectUseOpcode(WorldPacket & recv_data)
@@ -312,7 +312,7 @@ void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket)
if (!go)
return;
if (!go->IsWithinDistInMap(_player,INTERACTION_DISTANCE))
if (!go->IsWithinDistInMap(_player, INTERACTION_DISTANCE))
return;
go->AI()->GossipHello(_player);
@@ -390,7 +390,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
// auto-selection buff level base at target level (in spellInfo)
if (targets.getUnitTarget())
{
SpellEntry const *actualSpellInfo = sSpellMgr->SelectAuraRankForPlayerLevel(spellInfo,targets.getUnitTarget()->getLevel());
SpellEntry const *actualSpellInfo = sSpellMgr->SelectAuraRankForPlayerLevel(spellInfo, targets.getUnitTarget()->getLevel());
// if rank not found then function return NULL but in explicit cast case original spell can be casted and later failed with appropriate error message
if (actualSpellInfo)
@@ -410,7 +410,7 @@ void WorldSession::HandleCancelCastOpcode(WorldPacket& recvPacket)
recvPacket >> spellId;
if (_player->IsNonMeleeSpellCasted(false))
_player->InterruptNonMeleeSpells(false,spellId,false);
_player->InterruptNonMeleeSpells(false, spellId, false);
}
void WorldSession::HandleCancelAuraOpcode(WorldPacket& recvPacket)
@@ -459,7 +459,7 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
return;
}
Creature* pet=ObjectAccessor::GetCreatureOrPetOrVehicle(*_player,guid);
Creature* pet=ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (!pet)
{
@@ -538,7 +538,7 @@ void WorldSession::HandleSelfResOpcode(WorldPacket & /*recv_data*/)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL));
if (spellInfo)
_player->CastSpell(_player,spellInfo,false,0);
_player->CastSpell(_player, spellInfo, false, 0);
_player->SetUInt32Value(PLAYER_SELF_RES_SPELL, 0);
}
@@ -574,7 +574,7 @@ void WorldSession::HandleMirrrorImageDataRequest(WorldPacket & recv_data)
return;
// Get creator of the unit
Unit *creator = ObjectAccessor::GetObjectInWorld(unit->GetCreatorGUID(),(Unit*)NULL);
Unit *creator = ObjectAccessor::GetObjectInWorld(unit->GetCreatorGUID(), (Unit*)NULL);
if (!creator)
return;
@@ -49,13 +49,13 @@ void WorldSession::SendTaxiStatus(uint64 guid)
return;
}
uint32 curloc = sObjectMgr->GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
uint32 curloc = sObjectMgr->GetNearestTaxiNode(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), unit->GetMapId(), GetPlayer()->GetTeam());
// not found nearest
if (curloc == 0)
return;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: current location %u ",curloc);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: current location %u ", curloc);
WorldPacket data(SMSG_TAXINODE_STATUS, 9);
data << guid;
@@ -94,7 +94,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recv_data)
void WorldSession::SendTaxiMenu(Creature* unit)
{
// find current node
uint32 curloc = sObjectMgr->GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
uint32 curloc = sObjectMgr->GetNearestTaxiNode(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), unit->GetMapId(), GetPlayer()->GetTeam());
if (curloc == 0)
return;
@@ -102,13 +102,13 @@ void WorldSession::SendTaxiMenu(Creature* unit)
bool lastTaxiCheaterState = GetPlayer()->isTaxiCheater();
if (unit->GetEntry() == 29480) GetPlayer()->SetTaxiCheater(true); // Grimwing in Ebon Hold, special case. NOTE: Not perfect, Zul'Aman should not be included according to WoWhead, and I think taxicheat includes it.
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_TAXINODE_STATUS_QUERY %u ",curloc);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_TAXINODE_STATUS_QUERY %u ", curloc);
WorldPacket data(SMSG_SHOWTAXINODES, (4+8+4+8*4));
data << uint32(1);
data << uint64(unit->GetGUID());
data << uint32(curloc);
GetPlayer()->m_taxi.AppendTaximaskTo(data,GetPlayer()->isTaxiCheater());
GetPlayer()->m_taxi.AppendTaximaskTo(data, GetPlayer()->isTaxiCheater());
SendPacket(&data);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_SHOWTAXINODES");
@@ -128,13 +128,13 @@ void WorldSession::SendDoFlight(uint32 mountDisplayId, uint32 path, uint32 pathN
if (mountDisplayId)
GetPlayer()->Mount(mountDisplayId);
GetPlayer()->GetMotionMaster()->MoveTaxiFlight(path,pathNode);
GetPlayer()->GetMotionMaster()->MoveTaxiFlight(path, pathNode);
}
bool WorldSession::SendLearnNewTaxiNode(Creature* unit)
{
// find current node
uint32 curloc = sObjectMgr->GetNearestTaxiNode(unit->GetPositionX(),unit->GetPositionY(),unit->GetPositionZ(),unit->GetMapId(),GetPlayer()->GetTeam());
uint32 curloc = sObjectMgr->GetNearestTaxiNode(unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ(), unit->GetMapId(), GetPlayer()->GetTeam());
if (curloc == 0)
return true; // `true` send to avoid WorldSession::SendTaxiMenu call with one more curlock seartch with same false result.
@@ -191,7 +191,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recv_data)
if (nodes.empty())
return;
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d" ,nodes.front(),nodes.back());
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d" , nodes.front(), nodes.back());
GetPlayer()->ActivateTaxiPathTo(nodes, npc);
}
@@ -231,7 +231,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
TaxiPathNodeEntry const& node = flight->GetPath()[flight->GetCurrentNode()];
flight->SkipCurrentNode();
GetPlayer()->TeleportTo(curDestNode->map_id,node.x,node.y,node.z,GetPlayer()->GetOrientation());
GetPlayer()->TeleportTo(curDestNode->map_id, node.x, node.y, node.z, GetPlayer()->GetOrientation());
}
return;
}
@@ -283,7 +283,7 @@ void WorldSession::HandleActivateTaxiOpcode(WorldPacket & recv_data)
nodes.resize(2);
recv_data >> guid >> nodes[0] >> nodes[1];
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI from %d to %d" ,nodes[0],nodes[1]);
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI from %d to %d" , nodes[0], nodes[1]);
Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!npc)
{
@@ -69,13 +69,13 @@ void WorldSession::SendTradeStatus(TradeStatus status)
void WorldSession::HandleIgnoreTradeOpcode(WorldPacket& /*recvPacket*/)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Ignore Trade %u",_player->GetGUIDLow());
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Ignore Trade %u", _player->GetGUIDLow());
// recvPacket.print_storage();
}
void WorldSession::HandleBusyTradeOpcode(WorldPacket& /*recvPacket*/)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Busy Trade %u",_player->GetGUIDLow());
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Busy Trade %u", _player->GetGUIDLow());
// recvPacket.print_storage();
}
@@ -150,7 +150,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (myItems[i])
{
// logging
sLog->outDebug(LOG_FILTER_NETWORKIO, "partner storing: %u",myItems[i]->GetGUIDLow());
sLog->outDebug(LOG_FILTER_NETWORKIO, "partner storing: %u", myItems[i]->GetGUIDLow());
if (_player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
{
sLog->outCommand(_player->GetSession()->GetAccountId(), "GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
@@ -168,10 +168,10 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (hisItems[i])
{
// logging
sLog->outDebug(LOG_FILTER_NETWORKIO, "player storing: %u",hisItems[i]->GetGUIDLow());
sLog->outDebug(LOG_FILTER_NETWORKIO, "player storing: %u", hisItems[i]->GetGUIDLow());
if (trader->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
{
sLog->outCommand(trader->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
sLog->outCommand(trader->GetSession()->GetAccountId(), "GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
trader->GetName(), trader->GetSession()->GetAccountId(),
hisItems[i]->GetTemplate()->Name1.c_str(), hisItems[i]->GetEntry(), hisItems[i]->GetCount(),
_player->GetName(), _player->GetSession()->GetAccountId());
@@ -191,21 +191,21 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (myItems[i])
{
if (!traderCanTrade)
sLog->outError("trader can't store item: %u",myItems[i]->GetGUIDLow());
sLog->outError("trader can't store item: %u", myItems[i]->GetGUIDLow());
if (_player->CanStoreItem(NULL_BAG, NULL_SLOT, playerDst, myItems[i], false) == EQUIP_ERR_OK)
_player->MoveItemToInventory(playerDst, myItems[i], true, true);
else
sLog->outError("player can't take item back: %u",myItems[i]->GetGUIDLow());
sLog->outError("player can't take item back: %u", myItems[i]->GetGUIDLow());
}
// return the already removed items to the original owner
if (hisItems[i])
{
if (!playerCanTrade)
sLog->outError("player can't store item: %u",hisItems[i]->GetGUIDLow());
sLog->outError("player can't store item: %u", hisItems[i]->GetGUIDLow());
if (trader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, hisItems[i], false) == EQUIP_ERR_OK)
trader->MoveItemToInventory(traderDst, hisItems[i], true, true);
else
sLog->outError("trader can't take item back: %u",hisItems[i]->GetGUIDLow());
sLog->outError("trader can't take item back: %u", hisItems[i]->GetGUIDLow());
}
}
}
@@ -461,14 +461,14 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
{
if (_player->GetSession()->GetSecurity() > SEC_PLAYER && my_trade->GetMoney() > 0)
{
sLog->outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
sLog->outCommand(_player->GetSession()->GetAccountId(), "GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
_player->GetName(), _player->GetSession()->GetAccountId(),
my_trade->GetMoney(),
trader->GetName(), trader->GetSession()->GetAccountId());
}
if (trader->GetSession()->GetSecurity() > SEC_PLAYER && his_trade->GetMoney() > 0)
{
sLog->outCommand(trader->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
sLog->outCommand(trader->GetSession()->GetAccountId(), "GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
trader->GetName(), trader->GetSession()->GetAccountId(),
his_trade->GetMoney(),
_player->GetName(), _player->GetSession()->GetAccountId());
@@ -632,7 +632,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
return;
}
if (!pOther->IsWithinDistInMap(_player,10.0f,false))
if (!pOther->IsWithinDistInMap(_player, 10.0f, false))
{
SendTradeStatus(TRADE_STATUS_TARGET_TO_FAR);
return;
+4 -4
View File
@@ -666,7 +666,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x27D*/ { "CMSG_ENABLE_DAMAGE_LOG", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
/*0x27E*/ { "CMSG_GROUP_CHANGE_SUB_GROUP", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleGroupChangeSubGroupOpcode },
/*0x27F*/ { "CMSG_REQUEST_PARTY_MEMBER_STATS", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleRequestPartyMemberStatsOpcode},
/*0x280*/ { "CMSG_GROUP_SWAP_SUB_GROUP", STATUS_UNHANDLED,PROCESS_INPLACE, &WorldSession::Handle_NULL },
/*0x280*/ { "CMSG_GROUP_SWAP_SUB_GROUP", STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL },
/*0x281*/ { "CMSG_RESET_FACTION_CHEAT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
/*0x282*/ { "CMSG_AUTOSTORE_BANK_ITEM", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAutoStoreBankItemOpcode },
/*0x283*/ { "CMSG_AUTOBANK_ITEM", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleAutoBankItemOpcode },
@@ -684,7 +684,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x28F*/ { "CMSG_GROUP_ASSISTANT_LEADER", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleGroupAssistantLeaderOpcode},
/*0x290*/ { "CMSG_BUYBACK_ITEM", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleBuybackItem },
/*0x291*/ { "SMSG_SERVER_MESSAGE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x292*/ { "CMSG_SET_SAVED_INSTANCE_EXTEND", STATUS_UNHANDLED,PROCESS_INPLACE, &WorldSession::Handle_NULL },
/*0x292*/ { "CMSG_SET_SAVED_INSTANCE_EXTEND", STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL },
/*0x293*/ { "SMSG_LFG_OFFER_CONTINUE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x294*/ { "CMSG_MEETINGSTONE_CHEAT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
/*0x295*/ { "SMSG_MEETINGSTONE_SETQUEUE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
@@ -950,7 +950,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x399*/ { "CMSG_ACTIVE_PVP_CHEAT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
/*0x39A*/ { "CMSG_CHEAT_DUMP_ITEMS_DEBUG_ONLY", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
/*0x39B*/ { "SMSG_CHEAT_DUMP_ITEMS_DEBUG_ONLY_RESPONSE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x39C*/ { "SMSG_CHEAT_DUMP_ITEMS_DEBUG_ONLY_RESPONSE_WRITE_FILE",STATUS_NEVER,PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x39C*/ { "SMSG_CHEAT_DUMP_ITEMS_DEBUG_ONLY_RESPONSE_WRITE_FILE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x39D*/ { "SMSG_UPDATE_COMBO_POINTS", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x39E*/ { "SMSG_VOICE_SESSION_ROSTER_UPDATE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x39F*/ { "SMSG_VOICE_SESSION_LEAVE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
@@ -959,7 +959,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x3A2*/ { "SMSG_VOICE_SET_TALKER_MUTED", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x3A3*/ { "SMSG_INIT_EXTRA_AURA_INFO_OBSOLETE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x3A4*/ { "SMSG_SET_EXTRA_AURA_INFO_OBSOLETE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x3A5*/ { "SMSG_SET_EXTRA_AURA_INFO_NEED_UPDATE_OBSOLETE",STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x3A5*/ { "SMSG_SET_EXTRA_AURA_INFO_NEED_UPDATE_OBSOLETE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x3A6*/ { "SMSG_CLEAR_EXTRA_AURA_INFO_OBSOLETE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
/*0x3A7*/ { "MSG_MOVE_START_DESCEND", STATUS_LOGGEDIN, PROCESS_THREADSAFE, &WorldSession::HandleMovementOpcodes },
/*0x3A8*/ { "CMSG_IGNORE_REQUIREMENTS_CHEAT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
+5 -5
View File
@@ -545,8 +545,8 @@ enum Opcodes
SMSG_ENVIRONMENTALDAMAGELOG = 0x1FC,
CMSG_PLAYER_DIFFICULTY_CHANGE = 0x1FD,
SMSG_RWHOIS = 0x1FE,
SMSG_LFG_PLAYER_REWARD = 0x1FF, // uint32, uint8, uint32, uint32, uint32, uint32, uint32, uint8, for (uint8) {uint32,uint32,uint32}
SMSG_LFG_TELEPORT_DENIED = 0x200, // uint32 (1,2,4,6;0,5,7)
SMSG_LFG_PLAYER_REWARD = 0x1FF, // uint32, uint8, uint32, uint32, uint32, uint32, uint32, uint8, for (uint8) {uint32, uint32, uint32}
SMSG_LFG_TELEPORT_DENIED = 0x200, // uint32 (1, 2, 4, 6;0, 5, 7)
CMSG_UNLEARN_SPELL = 0x201,
CMSG_UNLEARN_SKILL = 0x202,
SMSG_REMOVED_SPELL = 0x203,
@@ -699,7 +699,7 @@ enum Opcodes
CMSG_MEETINGSTONE_INFO = 0x296, // EVENT_LFG_UPDATE
SMSG_MEETINGSTONE_COMPLETE = 0x297, // EVENT_MAIL_SHOW
SMSG_MEETINGSTONE_IN_PROGRESS = 0x298, // uint32, some UPDATE_COOLDOWN events
SMSG_MEETINGSTONE_MEMBER_ADDED = 0x299, // uint32, errors: ERR_NOT_IN_GROUP (2,51) and ERR_NOT_IN_RAID (3,39,40)
SMSG_MEETINGSTONE_MEMBER_ADDED = 0x299, // uint32, errors: ERR_NOT_IN_GROUP (2, 51) and ERR_NOT_IN_RAID (3, 39, 40)
CMSG_GMTICKETSYSTEM_TOGGLE = 0x29A,
CMSG_CANCEL_GROWTH_AURA = 0x29B,
SMSG_CANCEL_AUTO_REPEAT = 0x29C,
@@ -899,7 +899,7 @@ enum Opcodes
CMSG_SEARCH_LFG_JOIN = 0x35E, // CMSG SearchLFGJoin
CMSG_SEARCH_LFG_LEAVE = 0x35F, // CMSG SearchLFGLeave
SMSG_UPDATE_LFG_LIST = 0x360, // SMSG uint32, uint32, if (uint8) { uint32 count, for (count) { uint64} }, uint32 count2, uint32, for (count2) { uint64, uint32 flags, if (flags & 0x2) {string}, if (flags & 0x10) {for (3) uint8}, if (flags & 0x80) {uint64, uint32}}, uint32 count3, uint32, for (count3) {uint64, uint32 flags, if (flags & 0x1) {uint8, uint8, uint8, for (3) uint8, uint32, uint32, uint32, uint32, uint32, uint32, float, float, uint32, uint32, uint32, uint32, uint32, float, uint32, uint32, uint32, uint32, uint32, uint32}, if (flags&0x2) string, if (flags&0x4) uint8, if (flags&0x8) uint64, if (flags&0x10) uint8, if (flags&0x20) uint32, if (flags&0x40) uint8, if (flags& 0x80) {uint64, uint32}}
SMSG_LFG_PROPOSAL_UPDATE = 0x361, // SMSG uint32, uint8, uint32, uint32, uint8, for (uint8) {uint32,uint8,uint8,uint8,uint8}
SMSG_LFG_PROPOSAL_UPDATE = 0x361, // SMSG uint32, uint8, uint32, uint32, uint8, for (uint8) {uint32, uint8, uint8, uint8, uint8}
CMSG_LFG_PROPOSAL_RESULT = 0x362, // CMSG AcceptProposal, RejectProposal
SMSG_LFG_ROLE_CHECK_UPDATE = 0x363, // SMSG uint32, uint8, for (uint8) uint32, uint8, for (uint8) { uint64, uint8, uint32, uint8, }
SMSG_LFG_JOIN_RESULT = 0x364, // SMSG uint32 unk, uint32, if (unk == 6) { uint8 count, for (count) uint64 }
@@ -913,7 +913,7 @@ enum Opcodes
CMSG_LFG_SET_BOOT_VOTE = 0x36C, // CMSG SetLFGBootVote
SMSG_LFG_BOOT_PLAYER = 0x36D, // SMSG uint8, uint8, uint8, uint64, uint32, uint32, uint32, uint32
CMSG_LFD_PLAYER_LOCK_INFO_REQUEST = 0x36E, // CMSG RequestLFDPlayerLockInfo
SMSG_LFG_PLAYER_INFO = 0x36F, // SMSG uint8, for (uint8) { uint32, uint8, uint32, uint32, uint32, uint32, uint8, for (uint8) {uint32,uint32, uint32}}, uint32, for (uint32) {uint32,uint32}
SMSG_LFG_PLAYER_INFO = 0x36F, // SMSG uint8, for (uint8) { uint32, uint8, uint32, uint32, uint32, uint32, uint8, for (uint8) {uint32, uint32, uint32}}, uint32, for (uint32) {uint32, uint32}
CMSG_LFG_TELEPORT = 0x370, // CMSG LFGTeleport
CMSG_LFD_PARTY_LOCK_INFO_REQUEST = 0x371, // CMSG RequestLFDPartyLockInfo
SMSG_LFG_PARTY_INFO = 0x372, // SMSG uint8, for (uint8) uint64
+1 -1
View File
@@ -40,7 +40,7 @@ WorldLog::~WorldLog()
/// Open the log file (if specified so in the configuration file)
void WorldLog::Initialize()
{
std::string logsDir = sConfig->GetStringDefault("LogsDir","");
std::string logsDir = sConfig->GetStringDefault("LogsDir", "");
if (!logsDir.empty())
{