mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Core/Guild: Code Refactor
- Send correct events when modifiying Ranks (Add, modify, delete) - Store money/slots withdraw, not remaining slots. This will update remaining slots/money properly. - Reset daily slots/money withdraw for all members at same time, configurable - Better debug messages
This commit is contained in:
@@ -64,10 +64,10 @@ void WorldSession::SendNameQueryOpcode(uint64 guid)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleNameQueryOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleNameQueryOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
// This is disable by default to prevent lots of console spam
|
||||
// sLog->outInfo(LOG_FILTER_NETWORKIO, "HandleNameQueryOpcode %u", guid);
|
||||
@@ -75,7 +75,7 @@ void WorldSession::HandleNameQueryOpcode(WorldPacket& recv_data)
|
||||
SendNameQueryOpcode(guid);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQueryTimeOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleQueryTimeOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
SendQueryTimeResponse();
|
||||
}
|
||||
@@ -89,12 +89,12 @@ void WorldSession::SendQueryTimeResponse()
|
||||
}
|
||||
|
||||
/// Only _static_ data is sent in this packet !!!
|
||||
void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint32 entry;
|
||||
recv_data >> entry;
|
||||
recvData >> entry;
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(entry);
|
||||
if (ci)
|
||||
@@ -152,12 +152,12 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
/// Only _static_ data is sent in this packet !!!
|
||||
void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint32 entry;
|
||||
recv_data >> entry;
|
||||
recvData >> entry;
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
const GameObjectTemplate* info = sObjectMgr->GetGameObjectTemplate(entry);
|
||||
if (info)
|
||||
@@ -207,7 +207,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_CORPSE_QUERY");
|
||||
|
||||
@@ -258,15 +258,15 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint32 textID;
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> textID;
|
||||
recvData >> textID;
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
|
||||
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
GetPlayer()->SetSelection(guid);
|
||||
|
||||
GossipText const* pGossip = sObjectMgr->GetGossipText(textID);
|
||||
@@ -342,13 +342,13 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
/// Only _static_ data is sent in this packet !!!
|
||||
void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PAGE_TEXT_QUERY");
|
||||
|
||||
uint32 pageID;
|
||||
recv_data >> pageID;
|
||||
recv_data.read_skip<uint64>(); // guid
|
||||
recvData >> pageID;
|
||||
recvData.read_skip<uint64>(); // guid
|
||||
|
||||
while (pageID)
|
||||
{
|
||||
@@ -382,12 +382,12 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleCorpseMapPositionQuery(WorldPacket & recv_data)
|
||||
void WorldSession::HandleCorpseMapPositionQuery(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY");
|
||||
|
||||
uint32 unk;
|
||||
recv_data >> unk;
|
||||
recvData >> unk;
|
||||
|
||||
WorldPacket data(SMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE, 4+4+4+4);
|
||||
data << float(0);
|
||||
@@ -397,14 +397,14 @@ void WorldSession::HandleCorpseMapPositionQuery(WorldPacket & recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
|
||||
void WorldSession::HandleQuestPOIQuery(WorldPacket& recvData)
|
||||
{
|
||||
uint32 count;
|
||||
recv_data >> count; // quest count, max=25
|
||||
recvData >> count; // quest count, max=25
|
||||
|
||||
if (count >= MAX_QUEST_LOG_SIZE)
|
||||
{
|
||||
recv_data.rfinish();
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
|
||||
for (uint32 i = 0; i < count; ++i)
|
||||
{
|
||||
uint32 questId;
|
||||
recv_data >> questId; // quest id
|
||||
recvData >> questId; // quest id
|
||||
|
||||
bool questOk = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user