mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10635] Convert many opcode handlers to ObjectGuid use.
Also re-enabled anticheating check for bank window open base at .bank command access rights.
This commit is contained in:
parent
0901a4c2ac
commit
851e15c70a
26 changed files with 322 additions and 326 deletions
|
|
@ -562,7 +562,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode( WorldPacket & recv_data )
|
||||||
if (!bg)
|
if (!bg)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
|
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
|
||||||
|
|
@ -583,7 +583,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode( WorldPacket & recv_data )
|
||||||
if (!bg)
|
if (!bg)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
|
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
|
||||||
|
|
@ -601,7 +601,7 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
|
||||||
DEBUG_LOG("WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
|
DEBUG_LOG("WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
|
||||||
//recv_data.hexlike();
|
//recv_data.hexlike();
|
||||||
|
|
||||||
uint64 guid; // arena Battlemaster guid
|
ObjectGuid guid; // arena Battlemaster guid
|
||||||
uint8 arenaslot; // 2v2, 3v3 or 5v5
|
uint8 arenaslot; // 2v2, 3v3 or 5v5
|
||||||
uint8 asGroup; // asGroup
|
uint8 asGroup; // asGroup
|
||||||
uint8 isRated; // isRated
|
uint8 isRated; // isRated
|
||||||
|
|
|
||||||
|
|
@ -117,10 +117,10 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
|
||||||
// if (count)
|
// if (count)
|
||||||
// {
|
// {
|
||||||
// uint8 unk12,unk13;
|
// uint8 unk12,unk13;
|
||||||
// uint64 guid;
|
// ObjectGuid guid;
|
||||||
// for (int i=0;i<count;i++)
|
// for (int i=0;i<count;i++)
|
||||||
// {
|
// {
|
||||||
// recv_data.readPackGUID(guid);
|
// recv_data >> guid.ReadAsPacked();
|
||||||
// recv_data >> (uint8)unk12;
|
// recv_data >> (uint8)unk12;
|
||||||
// recv_data >> (uint8)unk13;
|
// recv_data >> (uint8)unk13;
|
||||||
// }
|
// }
|
||||||
|
|
|
||||||
|
|
@ -880,7 +880,7 @@ void WorldSession::HandleShowingCloakOpcode( WorldPacket & /*recv_data*/ )
|
||||||
|
|
||||||
void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
|
void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
std::string newname;
|
std::string newname;
|
||||||
|
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
@ -921,7 +921,7 @@ void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
|
||||||
CharacterDatabase.AsyncPQuery(&WorldSession::HandleChangePlayerNameOpcodeCallBack,
|
CharacterDatabase.AsyncPQuery(&WorldSession::HandleChangePlayerNameOpcodeCallBack,
|
||||||
GetAccountId(), newname,
|
GetAccountId(), newname,
|
||||||
"SELECT guid, name FROM characters WHERE guid = %d AND account = %d AND (at_login & %d) = %d AND NOT EXISTS (SELECT NULL FROM characters WHERE name = '%s')",
|
"SELECT guid, name FROM characters WHERE guid = %d AND account = %d AND (at_login & %d) = %d AND NOT EXISTS (SELECT NULL FROM characters WHERE name = '%s')",
|
||||||
GUID_LOPART(guid), GetAccountId(), AT_LOGIN_RENAME, AT_LOGIN_RENAME, escaped_newname.c_str()
|
guid.GetCounter(), GetAccountId(), AT_LOGIN_RENAME, AT_LOGIN_RENAME, escaped_newname.c_str()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -962,7 +962,7 @@ void WorldSession::HandleChangePlayerNameOpcodeCallBack(QueryResult *result, uin
|
||||||
|
|
||||||
void WorldSession::HandleSetPlayerDeclinedNamesOpcode(WorldPacket& recv_data)
|
void WorldSession::HandleSetPlayerDeclinedNamesOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
|
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
|
|
@ -972,7 +972,7 @@ void WorldSession::HandleSetPlayerDeclinedNamesOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
||||||
data << uint32(1);
|
data << uint32(1);
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -982,7 +982,7 @@ void WorldSession::HandleSetPlayerDeclinedNamesOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
||||||
data << uint32(1);
|
data << uint32(1);
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -991,7 +991,7 @@ void WorldSession::HandleSetPlayerDeclinedNamesOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
||||||
data << uint32(1);
|
data << uint32(1);
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1005,7 +1005,7 @@ void WorldSession::HandleSetPlayerDeclinedNamesOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
||||||
data << uint32(1);
|
data << uint32(1);
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1017,7 +1017,7 @@ void WorldSession::HandleSetPlayerDeclinedNamesOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
||||||
data << uint32(1);
|
data << uint32(1);
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1027,7 +1027,7 @@ void WorldSession::HandleSetPlayerDeclinedNamesOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
||||||
data << uint32(1);
|
data << uint32(1);
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1036,14 +1036,14 @@ void WorldSession::HandleSetPlayerDeclinedNamesOpcode(WorldPacket& recv_data)
|
||||||
CharacterDatabase.escape_string(declinedname.name[i]);
|
CharacterDatabase.escape_string(declinedname.name[i]);
|
||||||
|
|
||||||
CharacterDatabase.BeginTransaction();
|
CharacterDatabase.BeginTransaction();
|
||||||
CharacterDatabase.PExecute("DELETE FROM character_declinedname WHERE guid = '%u'", GUID_LOPART(guid));
|
CharacterDatabase.PExecute("DELETE FROM character_declinedname WHERE guid = '%u'", guid.GetCounter());
|
||||||
CharacterDatabase.PExecute("INSERT INTO character_declinedname (guid, genitive, dative, accusative, instrumental, prepositional) VALUES ('%u','%s','%s','%s','%s','%s')",
|
CharacterDatabase.PExecute("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());
|
guid.GetCounter(), 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();
|
CharacterDatabase.CommitTransaction();
|
||||||
|
|
||||||
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
||||||
data << uint32(0); // OK
|
data << uint32(0); // OK
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1116,7 +1116,7 @@ void WorldSession::HandleRemoveGlyphOpcode( WorldPacket & recv_data )
|
||||||
|
|
||||||
void WorldSession::HandleCharCustomizeOpcode(WorldPacket& recv_data)
|
void WorldSession::HandleCharCustomizeOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
std::string newname;
|
std::string newname;
|
||||||
|
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
@ -1125,7 +1125,7 @@ void WorldSession::HandleCharCustomizeOpcode(WorldPacket& recv_data)
|
||||||
uint8 gender, skin, face, hairStyle, hairColor, facialHair;
|
uint8 gender, skin, face, hairStyle, hairColor, facialHair;
|
||||||
recv_data >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face;
|
recv_data >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face;
|
||||||
|
|
||||||
QueryResult *result = CharacterDatabase.PQuery("SELECT at_login FROM characters WHERE guid ='%u'", GUID_LOPART(guid));
|
QueryResult *result = CharacterDatabase.PQuery("SELECT at_login FROM characters WHERE guid ='%u'", guid.GetCounter());
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
|
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
|
||||||
|
|
@ -1174,28 +1174,26 @@ void WorldSession::HandleCharCustomizeOpcode(WorldPacket& recv_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// character with this name already exist
|
// character with this name already exist
|
||||||
if (uint64 newguid = sObjectMgr.GetPlayerGUIDByName(newname))
|
ObjectGuid newguid = sObjectMgr.GetPlayerGUIDByName(newname);
|
||||||
|
if (!newguid.IsEmpty() && newguid != guid)
|
||||||
{
|
{
|
||||||
if (newguid != guid)
|
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
|
||||||
{
|
data << uint8(CHAR_CREATE_NAME_IN_USE);
|
||||||
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1);
|
SendPacket(&data);
|
||||||
data << uint8(CHAR_CREATE_NAME_IN_USE);
|
return;
|
||||||
SendPacket( &data );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CharacterDatabase.escape_string(newname);
|
CharacterDatabase.escape_string(newname);
|
||||||
Player::Customize(guid, gender, skin, face, hairStyle, hairColor, facialHair);
|
Player::Customize(guid, gender, skin, face, hairStyle, hairColor, facialHair);
|
||||||
CharacterDatabase.PExecute("UPDATE characters set name = '%s', at_login = at_login & ~ %u WHERE guid ='%u'", newname.c_str(), uint32(AT_LOGIN_CUSTOMIZE), GUID_LOPART(guid));
|
CharacterDatabase.PExecute("UPDATE characters set name = '%s', at_login = at_login & ~ %u WHERE guid ='%u'", newname.c_str(), uint32(AT_LOGIN_CUSTOMIZE), guid.GetCounter());
|
||||||
CharacterDatabase.PExecute("DELETE FROM character_declinedname WHERE guid ='%u'", GUID_LOPART(guid));
|
CharacterDatabase.PExecute("DELETE FROM character_declinedname WHERE guid ='%u'", guid.GetCounter());
|
||||||
|
|
||||||
std::string IP_str = GetRemoteAddress();
|
std::string IP_str = GetRemoteAddress();
|
||||||
sLog.outChar("Account: %d (IP: %s), Character guid: %u Customized to: %s", GetAccountId(), IP_str.c_str(), GUID_LOPART(guid), newname.c_str());
|
sLog.outChar("Account: %d (IP: %s), Character %s customized to: %s", GetAccountId(), IP_str.c_str(), guid.GetString().c_str(), newname.c_str());
|
||||||
|
|
||||||
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1+8+(newname.size()+1)+6);
|
WorldPacket data(SMSG_CHAR_CUSTOMIZE, 1+8+(newname.size()+1)+6);
|
||||||
data << uint8(RESPONSE_SUCCESS);
|
data << uint8(RESPONSE_SUCCESS);
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
data << newname;
|
data << newname;
|
||||||
data << uint8(gender);
|
data << uint8(gender);
|
||||||
data << uint8(skin);
|
data << uint8(skin);
|
||||||
|
|
|
||||||
|
|
@ -552,7 +552,7 @@ void WorldSession::HandleTextEmoteOpcode( WorldPacket & recv_data )
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 text_emote, emoteNum;
|
uint32 text_emote, emoteNum;
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
|
|
||||||
recv_data >> text_emote;
|
recv_data >> text_emote;
|
||||||
recv_data >> emoteNum;
|
recv_data >> emoteNum;
|
||||||
|
|
|
||||||
|
|
@ -26,17 +26,14 @@
|
||||||
|
|
||||||
void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
Player *pl;
|
recvPacket >> guid;
|
||||||
Player *plTarget;
|
|
||||||
|
|
||||||
if(!GetPlayer()->duel) // ignore accept from duel-sender
|
if(!GetPlayer()->duel) // ignore accept from duel-sender
|
||||||
return;
|
return;
|
||||||
|
|
||||||
recvPacket >> guid;
|
Player *pl = GetPlayer();
|
||||||
|
Player *plTarget = pl->duel->opponent;
|
||||||
pl = GetPlayer();
|
|
||||||
plTarget = pl->duel->opponent;
|
|
||||||
|
|
||||||
if(pl == pl->duel->initiator || !plTarget || pl == plTarget || pl->duel->startTime != 0 || plTarget->duel->startTime != 0)
|
if(pl == pl->duel->initiator || !plTarget || pl == plTarget || pl->duel->startTime != 0 || plTarget->duel->startTime != 0)
|
||||||
return;
|
return;
|
||||||
|
|
@ -75,7 +72,7 @@ void WorldSession::HandleDuelCancelledOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
// player either discarded the duel using the "discard button"
|
// player either discarded the duel using the "discard button"
|
||||||
// or used "/forfeit" before countdown reached 0
|
// or used "/forfeit" before countdown reached 0
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recvPacket >> guid;
|
recvPacket >> guid;
|
||||||
|
|
||||||
GetPlayer()->DuelComplete(DUEL_INTERUPTED);
|
GetPlayer()->DuelComplete(DUEL_INTERUPTED);
|
||||||
|
|
|
||||||
|
|
@ -386,10 +386,10 @@ void QuestMenu::ClearMenu()
|
||||||
m_qItems.clear();
|
m_qItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerMenu::SendQuestGiverQuestList( QEmote eEmote, const std::string& Title, uint64 npcGUID )
|
void PlayerMenu::SendQuestGiverQuestList(QEmote eEmote, const std::string& Title, ObjectGuid npcGUID)
|
||||||
{
|
{
|
||||||
WorldPacket data( SMSG_QUESTGIVER_QUEST_LIST, 100 ); // guess size
|
WorldPacket data( SMSG_QUESTGIVER_QUEST_LIST, 100 ); // guess size
|
||||||
data << uint64(npcGUID);
|
data << ObjectGuid(npcGUID);
|
||||||
data << Title;
|
data << Title;
|
||||||
data << uint32(eEmote._Delay ); // player emote
|
data << uint32(eEmote._Delay ); // player emote
|
||||||
data << uint32(eEmote._Emote ); // NPC emote
|
data << uint32(eEmote._Emote ); // NPC emote
|
||||||
|
|
@ -427,7 +427,7 @@ void PlayerMenu::SendQuestGiverQuestList( QEmote eEmote, const std::string& Titl
|
||||||
}
|
}
|
||||||
data.put<uint8>(count_pos, count);
|
data.put<uint8>(count_pos, count);
|
||||||
GetMenuSession()->SendPacket( &data );
|
GetMenuSession()->SendPacket( &data );
|
||||||
DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID));
|
DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid = %s", npcGUID.GetString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerMenu::SendQuestGiverStatus( uint8 questStatus, ObjectGuid npcGUID )
|
void PlayerMenu::SendQuestGiverStatus( uint8 questStatus, ObjectGuid npcGUID )
|
||||||
|
|
@ -440,7 +440,7 @@ void PlayerMenu::SendQuestGiverStatus( uint8 questStatus, ObjectGuid npcGUID )
|
||||||
DEBUG_LOG( "WORLD: Sent SMSG_QUESTGIVER_STATUS for %s", npcGUID.GetString().c_str());
|
DEBUG_LOG( "WORLD: Sent SMSG_QUESTGIVER_STATUS for %s", npcGUID.GetString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID, bool ActivateAccept )
|
void PlayerMenu::SendQuestGiverQuestDetails(Quest const *pQuest, ObjectGuid npcGUID, bool ActivateAccept)
|
||||||
{
|
{
|
||||||
std::string Title = pQuest->GetTitle();
|
std::string Title = pQuest->GetTitle();
|
||||||
std::string Details = pQuest->GetDetails();
|
std::string Details = pQuest->GetDetails();
|
||||||
|
|
@ -461,7 +461,7 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldPacket data(SMSG_QUESTGIVER_QUEST_DETAILS, 100); // guess size
|
WorldPacket data(SMSG_QUESTGIVER_QUEST_DETAILS, 100); // guess size
|
||||||
data << uint64(npcGUID);
|
data << ObjectGuid(npcGUID);
|
||||||
data << uint64(0); // wotlk, something todo with quest sharing?
|
data << uint64(0); // wotlk, something todo with quest sharing?
|
||||||
data << uint32(pQuest->GetQuestId());
|
data << uint32(pQuest->GetQuestId());
|
||||||
data << Title;
|
data << Title;
|
||||||
|
|
@ -559,7 +559,7 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
|
||||||
|
|
||||||
GetMenuSession()->SendPacket( &data );
|
GetMenuSession()->SendPacket( &data );
|
||||||
|
|
||||||
DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
|
DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid = %s, questid = %u", npcGUID.GetString().c_str(), pQuest->GetQuestId());
|
||||||
}
|
}
|
||||||
|
|
||||||
// send only static data in this packet!
|
// send only static data in this packet!
|
||||||
|
|
@ -712,7 +712,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
|
||||||
DEBUG_LOG( "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId() );
|
DEBUG_LOG( "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID, bool EnableNext )
|
void PlayerMenu::SendQuestGiverOfferReward(Quest const* pQuest, ObjectGuid npcGUID, bool EnableNext)
|
||||||
{
|
{
|
||||||
std::string Title = pQuest->GetTitle();
|
std::string Title = pQuest->GetTitle();
|
||||||
std::string OfferRewardText = pQuest->GetOfferRewardText();
|
std::string OfferRewardText = pQuest->GetOfferRewardText();
|
||||||
|
|
@ -731,7 +731,7 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
|
||||||
|
|
||||||
WorldPacket data( SMSG_QUESTGIVER_OFFER_REWARD, 50 ); // guess size
|
WorldPacket data( SMSG_QUESTGIVER_OFFER_REWARD, 50 ); // guess size
|
||||||
|
|
||||||
data << uint64(npcGUID);
|
data << ObjectGuid(npcGUID);
|
||||||
data << uint32(pQuest->GetQuestId());
|
data << uint32(pQuest->GetQuestId());
|
||||||
data << Title;
|
data << Title;
|
||||||
data << OfferRewardText;
|
data << OfferRewardText;
|
||||||
|
|
@ -815,11 +815,11 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
|
||||||
data << int32(0);
|
data << int32(0);
|
||||||
//data << int32(pQuest->RewRepValue[i]);
|
//data << int32(pQuest->RewRepValue[i]);
|
||||||
|
|
||||||
GetMenuSession()->SendPacket( &data );
|
GetMenuSession()->SendPacket(&data);
|
||||||
DEBUG_LOG( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId() );
|
DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid = %s, questid = %u", npcGUID.GetString().c_str(), pQuest->GetQuestId());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID, bool Completable, bool CloseOnCancel )
|
void PlayerMenu::SendQuestGiverRequestItems(Quest const *pQuest, ObjectGuid npcGUID, bool Completable, bool CloseOnCancel)
|
||||||
{
|
{
|
||||||
// We can always call to RequestItems, but this packet only goes out if there are actually
|
// We can always call to RequestItems, but this packet only goes out if there are actually
|
||||||
// items. Otherwise, we'll skip straight to the OfferReward
|
// items. Otherwise, we'll skip straight to the OfferReward
|
||||||
|
|
@ -846,7 +846,7 @@ void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldPacket data( SMSG_QUESTGIVER_REQUEST_ITEMS, 50 ); // guess size
|
WorldPacket data( SMSG_QUESTGIVER_REQUEST_ITEMS, 50 ); // guess size
|
||||||
data << uint64(npcGUID);
|
data << ObjectGuid(npcGUID);
|
||||||
data << uint32(pQuest->GetQuestId());
|
data << uint32(pQuest->GetQuestId());
|
||||||
data << Title;
|
data << Title;
|
||||||
data << RequestItemsText;
|
data << RequestItemsText;
|
||||||
|
|
@ -896,5 +896,5 @@ void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID
|
||||||
data << uint32(0x10); // flags4
|
data << uint32(0x10); // flags4
|
||||||
|
|
||||||
GetMenuSession()->SendPacket( &data );
|
GetMenuSession()->SendPacket( &data );
|
||||||
DEBUG_LOG( "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId() );
|
DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid = %s, questid = %u", npcGUID.GetString().c_str(), pQuest->GetQuestId());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -274,14 +274,14 @@ class MANGOS_DLL_SPEC PlayerMenu
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
/*** QUEST SYSTEM ***/
|
/*** QUEST SYSTEM ***/
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
void SendQuestGiverStatus( uint8 questStatus, ObjectGuid npcGUID );
|
void SendQuestGiverStatus(uint8 questStatus, ObjectGuid npcGUID);
|
||||||
|
|
||||||
void SendQuestGiverQuestList( QEmote eEmote, const std::string& Title, uint64 npcGUID );
|
void SendQuestGiverQuestList(QEmote eEmote, const std::string& Title, ObjectGuid npcGUID);
|
||||||
|
|
||||||
void SendQuestQueryResponse ( Quest const *pQuest );
|
void SendQuestQueryResponse(Quest const *pQuest);
|
||||||
void SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID, bool ActivateAccept);
|
void SendQuestGiverQuestDetails(Quest const *pQuest, ObjectGuid npcGUID, bool ActivateAccept);
|
||||||
|
|
||||||
void SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID, bool EnbleNext );
|
void SendQuestGiverOfferReward(Quest const* pQuest, ObjectGuid npcGUID, bool EnbleNext);
|
||||||
void SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID, bool Completable, bool CloseOnCancel );
|
void SendQuestGiverRequestItems(Quest const *pQuest, ObjectGuid npcGUID, bool Completable, bool CloseOnCancel);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data)
|
||||||
// can't uninvite yourself
|
// can't uninvite yourself
|
||||||
if (GetPlayer()->GetName() == membername)
|
if (GetPlayer()->GetName() == membername)
|
||||||
{
|
{
|
||||||
sLog.outError("WorldSession::HandleGroupUninviteOpcode: leader %s tried to uninvite himself from the group.", GetPlayer()->GetName(), GetPlayer()->GetObjectGuid().GetString().c_str());
|
sLog.outError("WorldSession::HandleGroupUninviteOpcode: leader %s tried to uninvite himself from the group.", GetPlayer()->GetObjectGuid().GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -803,15 +803,15 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke
|
||||||
void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data )
|
void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data )
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: Received CMSG_REQUEST_PARTY_MEMBER_STATS");
|
DEBUG_LOG("WORLD: Received CMSG_REQUEST_PARTY_MEMBER_STATS");
|
||||||
uint64 Guid;
|
ObjectGuid guid;
|
||||||
recv_data >> Guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
Player *player = sObjectMgr.GetPlayer(Guid);
|
Player *player = sObjectMgr.GetPlayer(guid);
|
||||||
if(!player)
|
if(!player)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_PARTY_MEMBER_STATS_FULL, 3+4+2);
|
WorldPacket data(SMSG_PARTY_MEMBER_STATS_FULL, 3+4+2);
|
||||||
data << uint8(0); // only for SMSG_PARTY_MEMBER_STATS_FULL, probably arena/bg related
|
data << uint8(0); // only for SMSG_PARTY_MEMBER_STATS_FULL, probably arena/bg related
|
||||||
data.appendPackGUID(Guid);
|
data << guid.WriteAsPacked();
|
||||||
data << uint32(GROUP_UPDATE_FLAG_STATUS);
|
data << uint32(GROUP_UPDATE_FLAG_STATUS);
|
||||||
data << uint16(MEMBER_STATUS_OFFLINE);
|
data << uint16(MEMBER_STATUS_OFFLINE);
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
#include "Item.h"
|
#include "Item.h"
|
||||||
#include "UpdateData.h"
|
#include "UpdateData.h"
|
||||||
|
#include "Chat.h"
|
||||||
|
|
||||||
void WorldSession::HandleSplitItemOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleSplitItemOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
|
|
@ -481,7 +482,7 @@ void WorldSession::HandlePageQuerySkippedOpcode( WorldPacket & recv_data )
|
||||||
|
|
||||||
recv_data >> itemid >> guid;
|
recv_data >> itemid >> guid;
|
||||||
|
|
||||||
DETAIL_LOG( "Packet Info: itemid: %u guid: %s", itemid, guid.GetString().c_str());
|
DETAIL_LOG("Packet Info: itemid: %u guid: %s", itemid, guid.GetString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleSellItemOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleSellItemOpcode( WorldPacket & recv_data )
|
||||||
|
|
@ -707,19 +708,19 @@ void WorldSession::HandleBuyItemOpcode( WorldPacket & recv_data )
|
||||||
|
|
||||||
void WorldSession::HandleListInventoryOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleListInventoryOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
|
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
if(!GetPlayer()->isAlive())
|
if (!GetPlayer()->isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DEBUG_LOG( "WORLD: Recvd CMSG_LIST_INVENTORY" );
|
DEBUG_LOG("WORLD: Recvd CMSG_LIST_INVENTORY");
|
||||||
|
|
||||||
SendListInventory( guid );
|
SendListInventory( guid );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendListInventory(uint64 vendorguid)
|
void WorldSession::SendListInventory(ObjectGuid vendorguid)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: Sent SMSG_LIST_INVENTORY");
|
DEBUG_LOG("WORLD: Sent SMSG_LIST_INVENTORY");
|
||||||
|
|
||||||
|
|
@ -727,7 +728,7 @@ void WorldSession::SendListInventory(uint64 vendorguid)
|
||||||
|
|
||||||
if (!pCreature)
|
if (!pCreature)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: SendListInventory - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)));
|
DEBUG_LOG("WORLD: SendListInventory - %s not found or you can't interact with him.", vendorguid.GetString().c_str());
|
||||||
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
|
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -745,7 +746,7 @@ void WorldSession::SendListInventory(uint64 vendorguid)
|
||||||
if (!vItems)
|
if (!vItems)
|
||||||
{
|
{
|
||||||
WorldPacket data( SMSG_LIST_INVENTORY, (8+1+1) );
|
WorldPacket data( SMSG_LIST_INVENTORY, (8+1+1) );
|
||||||
data << uint64(vendorguid);
|
data << ObjectGuid(vendorguid);
|
||||||
data << uint8(0); // count==0, next will be error code
|
data << uint8(0); // count==0, next will be error code
|
||||||
data << uint8(0); // "Vendor has no inventory"
|
data << uint8(0); // "Vendor has no inventory"
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
|
|
@ -756,7 +757,7 @@ void WorldSession::SendListInventory(uint64 vendorguid)
|
||||||
uint8 count = 0;
|
uint8 count = 0;
|
||||||
|
|
||||||
WorldPacket data( SMSG_LIST_INVENTORY, (8+1+numitems*8*4) );
|
WorldPacket data( SMSG_LIST_INVENTORY, (8+1+numitems*8*4) );
|
||||||
data << uint64(vendorguid);
|
data << ObjectGuid(vendorguid);
|
||||||
|
|
||||||
size_t count_pos = data.wpos();
|
size_t count_pos = data.wpos();
|
||||||
data << uint8(count); // placeholder, client limit 150 items (as of 3.3.3)
|
data << uint8(count); // placeholder, client limit 150 items (as of 3.3.3)
|
||||||
|
|
@ -865,22 +866,41 @@ void WorldSession::HandleAutoStoreBagItemOpcode( WorldPacket & recv_data )
|
||||||
_player->StoreItem( dest, pItem, true );
|
_player->StoreItem( dest, pItem, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool WorldSession::CheckBanker(ObjectGuid guid)
|
||||||
|
{
|
||||||
|
// GM case
|
||||||
|
if (guid == GetPlayer()->GetObjectGuid())
|
||||||
|
{
|
||||||
|
// command case will return only if player have real access to command
|
||||||
|
if (!ChatHandler(GetPlayer()).FindCommand("bank"))
|
||||||
|
{
|
||||||
|
DEBUG_LOG("%s attempt open bank in cheating way.", guid.GetString().c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// banker case
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER))
|
||||||
|
{
|
||||||
|
DEBUG_LOG("Banker %s not found or you can't interact with him.", guid.GetString().c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: CMSG_BUY_BANK_SLOT");
|
DEBUG_LOG("WORLD: CMSG_BUY_BANK_SLOT");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recvPacket >> guid;
|
recvPacket >> guid;
|
||||||
|
|
||||||
// cheating protection
|
if (!CheckBanker(guid))
|
||||||
/* not critical if "cheated", and check skip allow by slots in bank windows open by .bank command.
|
|
||||||
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER);
|
|
||||||
if(!pCreature)
|
|
||||||
{
|
|
||||||
DEBUG_LOG( "WORLD: HandleBuyBankSlotOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
uint32 slot = _player->GetBankBagSlotCount();
|
uint32 slot = _player->GetBankBagSlotCount();
|
||||||
|
|
||||||
|
|
@ -1407,10 +1427,10 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: CMSG_ITEM_REFUND_INFO_REQUEST");
|
DEBUG_LOG("WORLD: CMSG_ITEM_REFUND_INFO_REQUEST");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid itemGuid;
|
||||||
recv_data >> guid; // item guid
|
recv_data >> itemGuid;
|
||||||
|
|
||||||
Item *item = _player->GetItemByGuid(guid);
|
Item *item = _player->GetItemByGuid(itemGuid);
|
||||||
|
|
||||||
if(!item)
|
if(!item)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2310,9 +2310,8 @@ bool ChatHandler::HandleNpcNameCommand(char* /*args*/)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid = m_session->GetPlayer()->GetSelectionGuid();
|
||||||
guid = m_session->GetPlayer()->GetSelection();
|
if (guid.IsEmpty())
|
||||||
if (guid == 0)
|
|
||||||
{
|
{
|
||||||
SendSysMessage(LANG_NO_SELECTION);
|
SendSysMessage(LANG_NO_SELECTION);
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -2358,9 +2357,9 @@ bool ChatHandler::HandleNpcSubNameCommand(char* /*args*/)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint64 guid;
|
|
||||||
guid = m_session->GetPlayer()->GetSelection();
|
ObjectGuid guid = m_session->GetPlayer()->GetSelectionGuid();
|
||||||
if (guid == 0)
|
if (guid.IsEmpty())
|
||||||
{
|
{
|
||||||
SendSysMessage(LANG_NO_SELECTION);
|
SendSysMessage(LANG_NO_SELECTION);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -4094,8 +4094,8 @@ bool ChatHandler::HandleNpcAddWeaponCommand(char* /*args*/)
|
||||||
/*if (!*args)
|
/*if (!*args)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
uint64 guid = m_session->GetPlayer()->GetSelection();
|
ObjectGuid guid = m_session->GetPlayer()->GetSelectionGuid();
|
||||||
if (guid == 0)
|
if (guid.IsEmpty())
|
||||||
{
|
{
|
||||||
SendSysMessage(LANG_NO_SELECTION);
|
SendSysMessage(LANG_NO_SELECTION);
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -4428,14 +4428,14 @@ bool ChatHandler::HandleAuctionCommand(char* /*args*/)
|
||||||
|
|
||||||
bool ChatHandler::HandleBankCommand(char* /*args*/)
|
bool ChatHandler::HandleBankCommand(char* /*args*/)
|
||||||
{
|
{
|
||||||
m_session->SendShowBank( m_session->GetPlayer()->GetGUID() );
|
m_session->SendShowBank(m_session->GetPlayer()->GetObjectGuid());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ChatHandler::HandleStableCommand(char* /*args*/)
|
bool ChatHandler::HandleStableCommand(char* /*args*/)
|
||||||
{
|
{
|
||||||
m_session->SendStablePet(m_session->GetPlayer()->GetGUID());
|
m_session->SendStablePet(m_session->GetPlayer()->GetObjectGuid());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -264,11 +264,11 @@ void WorldSession::HandleLootOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: CMSG_LOOT");
|
DEBUG_LOG("WORLD: CMSG_LOOT");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
// Check possible cheat
|
// Check possible cheat
|
||||||
if(!_player->isAlive())
|
if (!_player->isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GetPlayer()->SendLoot(guid, LOOT_CORPSE);
|
GetPlayer()->SendLoot(guid, LOOT_CORPSE);
|
||||||
|
|
|
||||||
|
|
@ -587,10 +587,10 @@ void WorldSession::HandleDelIgnoreOpcode( WorldPacket & recv_data )
|
||||||
void WorldSession::HandleSetContactNotesOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleSetContactNotesOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
DEBUG_LOG("CMSG_SET_CONTACT_NOTES");
|
DEBUG_LOG("CMSG_SET_CONTACT_NOTES");
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
std::string note;
|
std::string note;
|
||||||
recv_data >> guid >> note;
|
recv_data >> guid >> note;
|
||||||
_player->GetSocial()->SetFriendNote(GUID_LOPART(guid), note);
|
_player->GetSocial()->SetFriendNote(guid.GetCounter(), note);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleBugOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleBugOpcode( WorldPacket & recv_data )
|
||||||
|
|
@ -619,7 +619,7 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
|
||||||
{
|
{
|
||||||
DETAIL_LOG("WORLD: Received CMSG_RECLAIM_CORPSE");
|
DETAIL_LOG("WORLD: Received CMSG_RECLAIM_CORPSE");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
if (GetPlayer()->isAlive())
|
if (GetPlayer()->isAlive())
|
||||||
|
|
@ -656,7 +656,7 @@ void WorldSession::HandleResurrectResponseOpcode(WorldPacket & recv_data)
|
||||||
{
|
{
|
||||||
DETAIL_LOG("WORLD: Received CMSG_RESURRECT_RESPONSE");
|
DETAIL_LOG("WORLD: Received CMSG_RESURRECT_RESPONSE");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
uint8 status;
|
uint8 status;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
recv_data >> status;
|
recv_data >> status;
|
||||||
|
|
@ -965,7 +965,7 @@ void WorldSession::HandleMoveTimeSkippedOpcode( WorldPacket & recv_data )
|
||||||
recv_data >> Unused<uint32>();
|
recv_data >> Unused<uint32>();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
uint32 time_skipped;
|
uint32 time_skipped;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
recv_data >> time_skipped;
|
recv_data >> time_skipped;
|
||||||
|
|
@ -992,7 +992,7 @@ void WorldSession::HandleMoveUnRootAck(WorldPacket& recv_data)
|
||||||
// no used
|
// no used
|
||||||
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
/*
|
/*
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
// now can skip not our packet
|
// now can skip not our packet
|
||||||
|
|
@ -1016,11 +1016,11 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recv_data)
|
||||||
// no used
|
// no used
|
||||||
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
/*
|
/*
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
// now can skip not our packet
|
// now can skip not our packet
|
||||||
if(_player->GetGUID() != guid)
|
if(_player->GetObjectGuid() != guid)
|
||||||
{
|
{
|
||||||
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
|
||||||
return;
|
return;
|
||||||
|
|
@ -1106,7 +1106,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
|
||||||
|
|
||||||
void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
|
void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
Player *player = sObjectMgr.GetPlayer(guid);
|
Player *player = sObjectMgr.GetPlayer(guid);
|
||||||
|
|
|
||||||
|
|
@ -47,13 +47,13 @@ enum StableResultCode
|
||||||
|
|
||||||
void WorldSession::HandleTabardVendorActivateOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleTabardVendorActivateOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TABARDDESIGNER);
|
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TABARDDESIGNER);
|
||||||
if (!unit)
|
if (!unit)
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: HandleTabardVendorActivateOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
|
DEBUG_LOG("WORLD: HandleTabardVendorActivateOpcode - %s not found or you can't interact with him.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -64,27 +64,23 @@ void WorldSession::HandleTabardVendorActivateOpcode( WorldPacket & recv_data )
|
||||||
SendTabardVendorActivate(guid);
|
SendTabardVendorActivate(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendTabardVendorActivate( uint64 guid )
|
void WorldSession::SendTabardVendorActivate(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
WorldPacket data( MSG_TABARDVENDOR_ACTIVATE, 8 );
|
WorldPacket data( MSG_TABARDVENDOR_ACTIVATE, 8 );
|
||||||
data << guid;
|
data << ObjectGuid(guid);
|
||||||
SendPacket( &data );
|
SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleBankerActivateOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleBankerActivateOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
|
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_BANKER_ACTIVATE" );
|
DEBUG_LOG("WORLD: Received CMSG_BANKER_ACTIVATE");
|
||||||
|
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_BANKER);
|
if (!CheckBanker(guid))
|
||||||
if (!unit)
|
|
||||||
{
|
|
||||||
DEBUG_LOG( "WORLD: HandleBankerActivateOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
// remove fake death
|
// remove fake death
|
||||||
if(GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
if(GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||||
|
|
@ -93,64 +89,60 @@ void WorldSession::HandleBankerActivateOpcode( WorldPacket & recv_data )
|
||||||
SendShowBank(guid);
|
SendShowBank(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendShowBank( uint64 guid )
|
void WorldSession::SendShowBank(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
WorldPacket data( SMSG_SHOW_BANK, 8 );
|
WorldPacket data(SMSG_SHOW_BANK, 8);
|
||||||
data << guid;
|
data << ObjectGuid(guid);
|
||||||
SendPacket( &data );
|
SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleTrainerListOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleTrainerListOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
|
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
SendTrainerList( guid );
|
|
||||||
|
SendTrainerList(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendTrainerList( uint64 guid )
|
void WorldSession::SendTrainerList(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
std::string str = GetMangosString(LANG_NPC_TAINER_HELLO);
|
std::string str = GetMangosString(LANG_NPC_TAINER_HELLO);
|
||||||
SendTrainerList( guid, str );
|
SendTrainerList(guid, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
|
void WorldSession::SendTrainerList(ObjectGuid guid, const std::string& strTitle)
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: SendTrainerList" );
|
DEBUG_LOG( "WORLD: SendTrainerList" );
|
||||||
|
|
||||||
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TRAINER);
|
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TRAINER);
|
||||||
if (!unit)
|
if (!unit)
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: SendTrainerList - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
|
DEBUG_LOG("WORLD: SendTrainerList - %s not found or you can't interact with him.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove fake death
|
// remove fake death
|
||||||
if(GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||||
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
||||||
|
|
||||||
// trainer list loaded at check;
|
// trainer list loaded at check;
|
||||||
if(!unit->IsTrainerOf(_player,true))
|
if (!unit->IsTrainerOf(_player,true))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CreatureInfo const *ci = unit->GetCreatureInfo();
|
CreatureInfo const *ci = unit->GetCreatureInfo();
|
||||||
|
|
||||||
if (!ci)
|
if (!ci)
|
||||||
{
|
|
||||||
DEBUG_LOG( "WORLD: SendTrainerList - (GUID: %u) NO CREATUREINFO!",GUID_LOPART(guid) );
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
TrainerSpellData const* trainer_spells = unit->GetTrainerSpells();
|
TrainerSpellData const* trainer_spells = unit->GetTrainerSpells();
|
||||||
if(!trainer_spells)
|
if (!trainer_spells)
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)",
|
DEBUG_LOG("WORLD: SendTrainerList - Training spells not found for %s", guid.GetString().c_str());
|
||||||
GUID_LOPART(guid), unit->GetEntry());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldPacket data( SMSG_TRAINER_LIST, 8+4+4+trainer_spells->spellList.size()*38 + strTitle.size()+1);
|
WorldPacket data( SMSG_TRAINER_LIST, 8+4+4+trainer_spells->spellList.size()*38 + strTitle.size()+1);
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
data << uint32(trainer_spells->trainerType);
|
data << uint32(trainer_spells->trainerType);
|
||||||
|
|
||||||
size_t count_pos = data.wpos();
|
size_t count_pos = data.wpos();
|
||||||
|
|
@ -197,38 +189,38 @@ void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
|
||||||
|
|
||||||
void WorldSession::HandleTrainerBuySpellOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleTrainerBuySpellOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
uint32 spellId = 0;
|
uint32 spellId = 0;
|
||||||
|
|
||||||
recv_data >> guid >> spellId;
|
recv_data >> guid >> spellId;
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_TRAINER_BUY_SPELL NpcGUID=%u, learn spell id is: %u",uint32(GUID_LOPART(guid)), spellId );
|
DEBUG_LOG("WORLD: Received CMSG_TRAINER_BUY_SPELL Trainer: %s, learn spell id is: %u", guid.GetString().c_str(), spellId);
|
||||||
|
|
||||||
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
|
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
|
||||||
if (!unit)
|
if (!unit)
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: HandleTrainerBuySpellOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
|
DEBUG_LOG("WORLD: HandleTrainerBuySpellOpcode - %s not found or you can't interact with him.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove fake death
|
// remove fake death
|
||||||
if(GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||||
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
||||||
|
|
||||||
if(!unit->IsTrainerOf(_player,true))
|
if (!unit->IsTrainerOf(_player, true))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// check present spell in trainer spell list
|
// check present spell in trainer spell list
|
||||||
TrainerSpellData const* trainer_spells = unit->GetTrainerSpells();
|
TrainerSpellData const* trainer_spells = unit->GetTrainerSpells();
|
||||||
if(!trainer_spells)
|
if (!trainer_spells)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// not found, cheat?
|
// not found, cheat?
|
||||||
TrainerSpell const* trainer_spell = trainer_spells->Find(spellId);
|
TrainerSpell const* trainer_spell = trainer_spells->Find(spellId);
|
||||||
if(!trainer_spell)
|
if (!trainer_spell)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// can't be learn, cheat? Or double learn with lags...
|
// can't be learn, cheat? Or double learn with lags...
|
||||||
if(_player->GetTrainerSpellState(trainer_spell) != TRAINER_SPELL_GREEN)
|
if (_player->GetTrainerSpellState(trainer_spell) != TRAINER_SPELL_GREEN)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// apply reputation discount
|
// apply reputation discount
|
||||||
|
|
@ -241,7 +233,7 @@ void WorldSession::HandleTrainerBuySpellOpcode( WorldPacket & recv_data )
|
||||||
_player->ModifyMoney( -int32(nSpellCost) );
|
_player->ModifyMoney( -int32(nSpellCost) );
|
||||||
|
|
||||||
WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 12); // visual effect on trainer
|
WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 12); // visual effect on trainer
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
data << uint32(0xB3); // index from SpellVisualKit.dbc
|
data << uint32(0xB3); // index from SpellVisualKit.dbc
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
|
|
||||||
|
|
@ -257,7 +249,7 @@ void WorldSession::HandleTrainerBuySpellOpcode( WorldPacket & recv_data )
|
||||||
_player->learnSpell(spellId, false);
|
_player->learnSpell(spellId, false);
|
||||||
|
|
||||||
data.Initialize(SMSG_TRAINER_BUY_SUCCEEDED, 12);
|
data.Initialize(SMSG_TRAINER_BUY_SUCCEEDED, 12);
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
data << uint32(spellId); // should be same as in packet from client
|
data << uint32(spellId); // should be same as in packet from client
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
@ -266,14 +258,13 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: Received CMSG_GOSSIP_HELLO");
|
DEBUG_LOG("WORLD: Received CMSG_GOSSIP_HELLO");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
|
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
|
||||||
|
|
||||||
if (!pCreature)
|
if (!pCreature)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
|
DEBUG_LOG("WORLD: HandleGossipHelloOpcode - %s not found or you can't interact with him.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -364,19 +355,19 @@ void WorldSession::HandleSpiritHealerActivateOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
|
DEBUG_LOG("WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
|
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_SPIRITHEALER);
|
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_SPIRITHEALER);
|
||||||
if (!unit)
|
if (!unit)
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: HandleSpiritHealerActivateOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
|
DEBUG_LOG( "WORLD: HandleSpiritHealerActivateOpcode - %s not found or you can't interact with him.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove fake death
|
// remove fake death
|
||||||
if(GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||||
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
||||||
|
|
||||||
SendSpiritResurrect();
|
SendSpiritResurrect();
|
||||||
|
|
|
||||||
|
|
@ -525,11 +525,12 @@ void WorldSession::HandlePetRename( WorldPacket & recv_data )
|
||||||
|
|
||||||
void WorldSession::HandlePetAbandon( WorldPacket & recv_data )
|
void WorldSession::HandlePetAbandon( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid; //pet guid
|
recv_data >> guid; //pet guid
|
||||||
DETAIL_LOG( "HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid) );
|
|
||||||
|
|
||||||
if(!_player->IsInWorld())
|
DETAIL_LOG("HandlePetAbandon. CMSG_PET_ABANDON pet guid is %s", guid.GetString().c_str());
|
||||||
|
|
||||||
|
if (!_player->IsInWorld())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// pet/charmed
|
// pet/charmed
|
||||||
|
|
@ -555,24 +556,24 @@ void WorldSession::HandlePetAbandon( WorldPacket & recv_data )
|
||||||
void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket)
|
||||||
{
|
{
|
||||||
DETAIL_LOG("CMSG_PET_UNLEARN");
|
DETAIL_LOG("CMSG_PET_UNLEARN");
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recvPacket >> guid; // Pet guid
|
recvPacket >> guid; // Pet guid
|
||||||
|
|
||||||
Pet* pet = _player->GetPet();
|
Pet* pet = _player->GetPet();
|
||||||
|
|
||||||
if(!pet || pet->getPetType() != HUNTER_PET || pet->m_usedTalentCount == 0)
|
if (!pet || guid != pet->GetObjectGuid())
|
||||||
return;
|
|
||||||
|
|
||||||
if(guid != pet->GetGUID())
|
|
||||||
{
|
{
|
||||||
sLog.outError( "HandlePetUnlearnOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
|
sLog.outError("HandlePetUnlearnOpcode. %s isn't pet of %s .", guid.GetString().c_str(), GetPlayer()->GetObjectGuid().GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pet->getPetType() != HUNTER_PET || pet->m_usedTalentCount == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
CharmInfo *charmInfo = pet->GetCharmInfo();
|
CharmInfo *charmInfo = pet->GetCharmInfo();
|
||||||
if(!charmInfo)
|
if (!charmInfo)
|
||||||
{
|
{
|
||||||
sLog.outError("WorldSession::HandlePetUnlearnOpcode: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
|
sLog.outError("WorldSession::HandlePetUnlearnOpcode: %s is considered pet-like but doesn't have a charminfo!", pet->GetObjectGuid().GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pet->resetTalents();
|
pet->resetTalents();
|
||||||
|
|
@ -582,34 +583,30 @@ void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket)
|
||||||
void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket )
|
void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket )
|
||||||
{
|
{
|
||||||
DETAIL_LOG("CMSG_PET_SPELL_AUTOCAST");
|
DETAIL_LOG("CMSG_PET_SPELL_AUTOCAST");
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
uint32 spellid;
|
uint32 spellid;
|
||||||
uint8 state; //1 for on, 0 for off
|
uint8 state; //1 for on, 0 for off
|
||||||
recvPacket >> guid >> spellid >> state;
|
recvPacket >> guid >> spellid >> state;
|
||||||
|
|
||||||
if(!_player->GetPet() && !_player->GetCharm())
|
|
||||||
return;
|
|
||||||
|
|
||||||
Creature* pet = _player->GetMap()->GetAnyTypeCreature(guid);
|
Creature* pet = _player->GetMap()->GetAnyTypeCreature(guid);
|
||||||
|
if (!pet || (guid.GetRawValue() != _player->GetPetGUID() && guid.GetRawValue() != _player->GetCharmGUID()))
|
||||||
if(!pet || (pet != _player->GetPet() && pet != _player->GetCharm()))
|
|
||||||
{
|
{
|
||||||
sLog.outError( "HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
|
sLog.outError("HandlePetSpellAutocastOpcode. %s isn't pet of %s .", guid.GetString().c_str(), GetPlayer()->GetObjectGuid().GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// do not add not learned spells/ passive spells
|
// do not add not learned spells/ passive spells
|
||||||
if(!pet->HasSpell(spellid) || IsPassiveSpell(spellid))
|
if (!pet->HasSpell(spellid) || IsPassiveSpell(spellid))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
CharmInfo *charmInfo = pet->GetCharmInfo();
|
CharmInfo *charmInfo = pet->GetCharmInfo();
|
||||||
if(!charmInfo)
|
if (!charmInfo)
|
||||||
{
|
{
|
||||||
sLog.outError("WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
|
sLog.outError("WorldSession::HandlePetSpellAutocastOpcod: %s is considered pet-like but doesn't have a charminfo!", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pet->isCharmed())
|
if (pet->isCharmed())
|
||||||
//state can be used as boolean
|
//state can be used as boolean
|
||||||
pet->GetCharmInfo()->ToggleCreatureAutocast(spellid, state);
|
pet->GetCharmInfo()->ToggleCreatureAutocast(spellid, state);
|
||||||
else
|
else
|
||||||
|
|
@ -622,23 +619,20 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
|
||||||
{
|
{
|
||||||
DETAIL_LOG("WORLD: CMSG_PET_CAST_SPELL");
|
DETAIL_LOG("WORLD: CMSG_PET_CAST_SPELL");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
uint32 spellid;
|
uint32 spellid;
|
||||||
uint8 cast_count;
|
uint8 cast_count;
|
||||||
uint8 unk_flags; // flags (if 0x02 - some additional data are received)
|
uint8 unk_flags; // flags (if 0x02 - some additional data are received)
|
||||||
|
|
||||||
recvPacket >> guid >> cast_count >> spellid >> unk_flags;
|
recvPacket >> guid >> cast_count >> spellid >> unk_flags;
|
||||||
|
|
||||||
DEBUG_LOG("WORLD: CMSG_PET_CAST_SPELL, cast_count: %u, spellid %u, unk_flags %u", cast_count, spellid, unk_flags);
|
DEBUG_LOG("WORLD: CMSG_PET_CAST_SPELL, %s, cast_count: %u, spellid %u, unk_flags %u", guid.GetString().c_str(), cast_count, spellid, unk_flags);
|
||||||
|
|
||||||
if (!_player->GetPet() && !_player->GetCharm())
|
|
||||||
return;
|
|
||||||
|
|
||||||
Creature* pet = _player->GetMap()->GetAnyTypeCreature(guid);
|
Creature* pet = _player->GetMap()->GetAnyTypeCreature(guid);
|
||||||
|
|
||||||
if (!pet || (pet != _player->GetPet() && pet!= _player->GetCharm()))
|
if (!pet || (guid.GetRawValue() != _player->GetPetGUID() && guid.GetRawValue() != _player->GetCharmGUID()))
|
||||||
{
|
{
|
||||||
sLog.outError( "HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
|
sLog.outError("HandlePetCastSpellOpcode: %s isn't pet of %s .", guid.GetString().c_str(), GetPlayer()->GetObjectGuid().GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -714,7 +708,7 @@ void WorldSession::HandlePetLearnTalent( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: CMSG_PET_LEARN_TALENT");
|
DEBUG_LOG("WORLD: CMSG_PET_LEARN_TALENT");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
uint32 talent_id, requested_rank;
|
uint32 talent_id, requested_rank;
|
||||||
recv_data >> guid >> talent_id >> requested_rank;
|
recv_data >> guid >> talent_id >> requested_rank;
|
||||||
|
|
||||||
|
|
@ -726,7 +720,7 @@ void WorldSession::HandleLearnPreviewTalentsPet( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
DEBUG_LOG("CMSG_LEARN_PREVIEW_TALENTS_PET");
|
DEBUG_LOG("CMSG_LEARN_PREVIEW_TALENTS_PET");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
uint32 talentsCount;
|
uint32 talentsCount;
|
||||||
|
|
|
||||||
|
|
@ -899,21 +899,21 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||||
|
|
||||||
void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recv_data)
|
void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recv_data)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("Received CMSG_PETITION_SHOWLIST"); // ok
|
DEBUG_LOG("Received CMSG_PETITION_SHOWLIST");
|
||||||
//recv_data.hexlike();
|
//recv_data.hexlike();
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
SendPetitionShowList(guid);
|
SendPetitionShowList(guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendPetitionShowList(uint64 guid)
|
void WorldSession::SendPetitionShowList(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_PETITIONER);
|
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_PETITIONER);
|
||||||
if (!pCreature)
|
if (!pCreature)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
|
DEBUG_LOG("WORLD: HandlePetitionShowListOpcode - %s not found or you can't interact with him.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -928,7 +928,7 @@ void WorldSession::SendPetitionShowList(uint64 guid)
|
||||||
count = 3;
|
count = 3;
|
||||||
|
|
||||||
WorldPacket data(SMSG_PETITION_SHOWLIST, 8+1+4*6);
|
WorldPacket data(SMSG_PETITION_SHOWLIST, 8+1+4*6);
|
||||||
data << uint64(guid); // npc guid
|
data << ObjectGuid(guid); // npc guid
|
||||||
data << uint8(count); // count
|
data << uint8(count); // count
|
||||||
if(count == 1)
|
if(count == 1)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -8538,17 +8538,17 @@ uint32 Player::GetXPRestBonus(uint32 xp)
|
||||||
return rested_bonus;
|
return rested_bonus;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::SetBindPoint(uint64 guid)
|
void Player::SetBindPoint(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
WorldPacket data(SMSG_BINDER_CONFIRM, 8);
|
WorldPacket data(SMSG_BINDER_CONFIRM, 8);
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
GetSession()->SendPacket( &data );
|
GetSession()->SendPacket( &data );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::SendTalentWipeConfirm(uint64 guid)
|
void Player::SendTalentWipeConfirm(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
WorldPacket data(MSG_TALENT_WIPE_CONFIRM, (8+4));
|
WorldPacket data(MSG_TALENT_WIPE_CONFIRM, (8+4));
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
data << uint32(resetTalentsCost());
|
data << uint32(resetTalentsCost());
|
||||||
GetSession()->SendPacket( &data );
|
GetSession()->SendPacket( &data );
|
||||||
}
|
}
|
||||||
|
|
@ -12736,7 +12736,7 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
||||||
canTalkToCredit = false;
|
canTalkToCredit = false;
|
||||||
break;
|
break;
|
||||||
case GOSSIP_OPTION_QUESTGIVER:
|
case GOSSIP_OPTION_QUESTGIVER:
|
||||||
PrepareQuestMenu(pSource->GetGUID());
|
PrepareQuestMenu(pSource->GetObjectGuid());
|
||||||
hasMenuItem = false;
|
hasMenuItem = false;
|
||||||
break;
|
break;
|
||||||
case GOSSIP_OPTION_ARMORER:
|
case GOSSIP_OPTION_ARMORER:
|
||||||
|
|
@ -12801,7 +12801,7 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
|
||||||
{
|
{
|
||||||
case GOSSIP_OPTION_QUESTGIVER:
|
case GOSSIP_OPTION_QUESTGIVER:
|
||||||
if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
|
if (pGo->GetGoType() == GAMEOBJECT_TYPE_QUESTGIVER)
|
||||||
PrepareQuestMenu(pSource->GetGUID());
|
PrepareQuestMenu(pSource->GetObjectGuid());
|
||||||
hasMenuItem = false;
|
hasMenuItem = false;
|
||||||
break;
|
break;
|
||||||
case GOSSIP_OPTION_GOSSIP:
|
case GOSSIP_OPTION_GOSSIP:
|
||||||
|
|
@ -12873,7 +12873,7 @@ void Player::SendPreparedGossip(WorldObject *pSource)
|
||||||
// in case no gossip flag and quest menu not empty, open quest menu (client expect gossip menu with this flag)
|
// in case no gossip flag and quest menu not empty, open quest menu (client expect gossip menu with this flag)
|
||||||
if (!((Creature*)pSource)->HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_GOSSIP) && !PlayerTalkClass->GetQuestMenu().Empty())
|
if (!((Creature*)pSource)->HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_GOSSIP) && !PlayerTalkClass->GetQuestMenu().Empty())
|
||||||
{
|
{
|
||||||
SendPreparedQuest(pSource->GetGUID());
|
SendPreparedQuest(pSource->GetObjectGuid());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -12882,7 +12882,7 @@ void Player::SendPreparedGossip(WorldObject *pSource)
|
||||||
// probably need to find a better way here
|
// probably need to find a better way here
|
||||||
if (!PlayerTalkClass->GetGossipMenu().GetMenuId() && !PlayerTalkClass->GetQuestMenu().Empty())
|
if (!PlayerTalkClass->GetGossipMenu().GetMenuId() && !PlayerTalkClass->GetQuestMenu().Empty())
|
||||||
{
|
{
|
||||||
SendPreparedQuest(pSource->GetGUID());
|
SendPreparedQuest(pSource->GetObjectGuid());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -12912,7 +12912,7 @@ void Player::OnGossipSelect(WorldObject* pSource, uint32 gossipListId, uint32 me
|
||||||
GossipMenuItem const& menu_item = gossipmenu.GetItem(gossipListId);
|
GossipMenuItem const& menu_item = gossipmenu.GetItem(gossipListId);
|
||||||
|
|
||||||
uint32 gossipOptionId = menu_item.m_gOptionId;
|
uint32 gossipOptionId = menu_item.m_gOptionId;
|
||||||
uint64 guid = pSource->GetGUID();
|
ObjectGuid guid = pSource->GetObjectGuid();
|
||||||
uint32 moneyTake = menu_item.m_gBoxMoney;
|
uint32 moneyTake = menu_item.m_gBoxMoney;
|
||||||
|
|
||||||
// if this function called and player have money for pay MoneyTake or cheating, proccess both cases
|
// if this function called and player have money for pay MoneyTake or cheating, proccess both cases
|
||||||
|
|
@ -13068,7 +13068,7 @@ uint32 Player::GetDefaultGossipMenuForSource(WorldObject *pSource)
|
||||||
/*** QUEST SYSTEM ***/
|
/*** QUEST SYSTEM ***/
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
|
|
||||||
void Player::PrepareQuestMenu(uint64 guid)
|
void Player::PrepareQuestMenu(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
QuestRelationsMapBounds rbounds;
|
QuestRelationsMapBounds rbounds;
|
||||||
QuestRelationsMapBounds irbounds;
|
QuestRelationsMapBounds irbounds;
|
||||||
|
|
@ -13128,7 +13128,7 @@ void Player::PrepareQuestMenu(uint64 guid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::SendPreparedQuest(uint64 guid)
|
void Player::SendPreparedQuest(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
QuestMenu& questMenu = PlayerTalkClass->GetQuestMenu();
|
QuestMenu& questMenu = PlayerTalkClass->GetQuestMenu();
|
||||||
|
|
||||||
|
|
@ -13236,7 +13236,7 @@ bool Player::IsCurrentQuest( uint32 quest_id ) const
|
||||||
return itr->second.m_status == QUEST_STATUS_INCOMPLETE || itr->second.m_status == QUEST_STATUS_COMPLETE && !itr->second.m_rewarded;
|
return itr->second.m_status == QUEST_STATUS_INCOMPLETE || itr->second.m_status == QUEST_STATUS_COMPLETE && !itr->second.m_rewarded;
|
||||||
}
|
}
|
||||||
|
|
||||||
Quest const* Player::GetNextQuest(uint64 guid, Quest const *pQuest)
|
Quest const* Player::GetNextQuest(ObjectGuid guid, Quest const *pQuest)
|
||||||
{
|
{
|
||||||
QuestRelationsMapBounds rbounds;
|
QuestRelationsMapBounds rbounds;
|
||||||
|
|
||||||
|
|
@ -17453,11 +17453,11 @@ void Player::SetUInt32ValueInArray(Tokens& tokens,uint16 index, uint32 value)
|
||||||
tokens[index] = buf;
|
tokens[index] = buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::Customize(uint64 guid, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair)
|
void Player::Customize(ObjectGuid guid, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair)
|
||||||
{
|
{
|
||||||
// 0
|
// 0
|
||||||
QueryResult* result = CharacterDatabase.PQuery("SELECT playerBytes2 FROM characters WHERE guid = '%u'", GUID_LOPART(guid));
|
QueryResult* result = CharacterDatabase.PQuery("SELECT playerBytes2 FROM characters WHERE guid = '%u'", guid.GetCounter());
|
||||||
if(!result)
|
if (!result)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Field* fields = result->Fetch();
|
Field* fields = result->Fetch();
|
||||||
|
|
@ -17466,7 +17466,7 @@ void Player::Customize(uint64 guid, uint8 gender, uint8 skin, uint8 face, uint8
|
||||||
player_bytes2 &= ~0xFF;
|
player_bytes2 &= ~0xFF;
|
||||||
player_bytes2 |= facialHair;
|
player_bytes2 |= facialHair;
|
||||||
|
|
||||||
CharacterDatabase.PExecute("UPDATE characters SET gender = '%u', playerBytes = '%u', playerBytes2 = '%u' WHERE guid = '%u'", gender, skin | (face << 8) | (hairStyle << 16) | (hairColor << 24), player_bytes2, GUID_LOPART(guid));
|
CharacterDatabase.PExecute("UPDATE characters SET gender = '%u', playerBytes = '%u', playerBytes2 = '%u' WHERE guid = '%u'", gender, skin | (face << 8) | (hairStyle << 16) | (hairColor << 24), player_bytes2, guid.GetCounter());
|
||||||
|
|
||||||
delete result;
|
delete result;
|
||||||
}
|
}
|
||||||
|
|
@ -20446,7 +20446,7 @@ uint32 Player::GetBaseWeaponSkillValue (WeaponAttackType attType) const
|
||||||
void Player::ResurectUsingRequestData()
|
void Player::ResurectUsingRequestData()
|
||||||
{
|
{
|
||||||
/// Teleport before resurrecting by player, otherwise the player might get attacked from creatures near his corpse
|
/// Teleport before resurrecting by player, otherwise the player might get attacked from creatures near his corpse
|
||||||
if(IS_PLAYER_GUID(m_resurrectGUID))
|
if (m_resurrectGuid.IsPlayer())
|
||||||
TeleportTo(m_resurrectMap, m_resurrectX, m_resurrectY, m_resurrectZ, GetOrientation());
|
TeleportTo(m_resurrectMap, m_resurrectX, m_resurrectY, m_resurrectZ, GetOrientation());
|
||||||
|
|
||||||
//we cannot resurrect player when we triggered far teleport
|
//we cannot resurrect player when we triggered far teleport
|
||||||
|
|
@ -21501,14 +21501,13 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
|
||||||
DETAIL_LOG("TalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
|
DETAIL_LOG("TalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
|
void Player::LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRank)
|
||||||
{
|
{
|
||||||
Pet *pet = GetPet();
|
Pet *pet = GetPet();
|
||||||
|
if (!pet)
|
||||||
if(!pet)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(petGuid != pet->GetGUID())
|
if (petGuid != pet->GetObjectGuid())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32 CurTalentPoints = pet->GetFreeTalentPoints();
|
uint32 CurTalentPoints = pet->GetFreeTalentPoints();
|
||||||
|
|
|
||||||
|
|
@ -1403,11 +1403,11 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
// Return player level when QuestLevel is dynamic (-1)
|
// Return player level when QuestLevel is dynamic (-1)
|
||||||
uint32 GetQuestLevelForPlayer(Quest const* pQuest) const { return pQuest && (pQuest->GetQuestLevel() > 0) ? (uint32)pQuest->GetQuestLevel() : getLevel(); }
|
uint32 GetQuestLevelForPlayer(Quest const* pQuest) const { return pQuest && (pQuest->GetQuestLevel() > 0) ? (uint32)pQuest->GetQuestLevel() : getLevel(); }
|
||||||
|
|
||||||
void PrepareQuestMenu( uint64 guid );
|
void PrepareQuestMenu(ObjectGuid guid );
|
||||||
void SendPreparedQuest( uint64 guid );
|
void SendPreparedQuest(ObjectGuid guid);
|
||||||
bool IsActiveQuest( uint32 quest_id ) const; // can be taken or taken
|
bool IsActiveQuest( uint32 quest_id ) const; // can be taken or taken
|
||||||
bool IsCurrentQuest( uint32 quest_id ) const; // taken and not yet rewarded
|
bool IsCurrentQuest( uint32 quest_id ) const; // taken and not yet rewarded
|
||||||
Quest const *GetNextQuest( uint64 guid, Quest const *pQuest );
|
Quest const *GetNextQuest(ObjectGuid guid, Quest const *pQuest );
|
||||||
bool CanSeeStartQuest( Quest const *pQuest ) const;
|
bool CanSeeStartQuest( Quest const *pQuest ) const;
|
||||||
bool CanTakeQuest( Quest const *pQuest, bool msg ) const;
|
bool CanTakeQuest( Quest const *pQuest, bool msg ) const;
|
||||||
bool CanAddQuest( Quest const *pQuest, bool msg ) const;
|
bool CanAddQuest( Quest const *pQuest, bool msg ) const;
|
||||||
|
|
@ -1536,7 +1536,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
void SaveGoldToDB();
|
void SaveGoldToDB();
|
||||||
static void SetUInt32ValueInArray(Tokens& data,uint16 index, uint32 value);
|
static void SetUInt32ValueInArray(Tokens& data,uint16 index, uint32 value);
|
||||||
static void SetFloatValueInArray(Tokens& data,uint16 index, float value);
|
static void SetFloatValueInArray(Tokens& data,uint16 index, float value);
|
||||||
static void Customize(uint64 guid, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair);
|
static void Customize(ObjectGuid guid, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair);
|
||||||
static void SavePositionInDB(uint32 mapid, float x,float y,float z,float o,uint32 zone,uint64 guid);
|
static void SavePositionInDB(uint32 mapid, float x,float y,float z,float o,uint32 zone,uint64 guid);
|
||||||
|
|
||||||
static void DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRealmChars = true, bool deleteFinally = false);
|
static void DeleteFromDB(ObjectGuid playerguid, uint32 accountId, bool updateRealmChars = true, bool deleteFinally = false);
|
||||||
|
|
@ -1547,8 +1547,8 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
|
|
||||||
void SendPetTameFailure(PetTameFailureReason reason);
|
void SendPetTameFailure(PetTameFailureReason reason);
|
||||||
|
|
||||||
void SetBindPoint(uint64 guid);
|
void SetBindPoint(ObjectGuid guid);
|
||||||
void SendTalentWipeConfirm(uint64 guid);
|
void SendTalentWipeConfirm(ObjectGuid guid);
|
||||||
void RewardRage( uint32 damage, uint32 weaponSpeedHitFactor, bool attacker );
|
void RewardRage( uint32 damage, uint32 weaponSpeedHitFactor, bool attacker );
|
||||||
void SendPetSkillWipeConfirm();
|
void SendPetSkillWipeConfirm();
|
||||||
void CalcRage( uint32 damage,bool attacker );
|
void CalcRage( uint32 damage,bool attacker );
|
||||||
|
|
@ -1666,7 +1666,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
void BuildPetTalentsInfoData(WorldPacket *data);
|
void BuildPetTalentsInfoData(WorldPacket *data);
|
||||||
void SendTalentsInfoData(bool pet);
|
void SendTalentsInfoData(bool pet);
|
||||||
void LearnTalent(uint32 talentId, uint32 talentRank);
|
void LearnTalent(uint32 talentId, uint32 talentRank);
|
||||||
void LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank);
|
void LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRank);
|
||||||
|
|
||||||
uint32 CalculateTalentsPoints() const;
|
uint32 CalculateTalentsPoints() const;
|
||||||
|
|
||||||
|
|
@ -1734,9 +1734,9 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
uint32 GetLastPotionId() { return m_lastPotionId; }
|
uint32 GetLastPotionId() { return m_lastPotionId; }
|
||||||
void UpdatePotionCooldown(Spell* spell = NULL);
|
void UpdatePotionCooldown(Spell* spell = NULL);
|
||||||
|
|
||||||
void setResurrectRequestData(uint64 guid, uint32 mapId, float X, float Y, float Z, uint32 health, uint32 mana)
|
void setResurrectRequestData(ObjectGuid guid, uint32 mapId, float X, float Y, float Z, uint32 health, uint32 mana)
|
||||||
{
|
{
|
||||||
m_resurrectGUID = guid;
|
m_resurrectGuid = guid;
|
||||||
m_resurrectMap = mapId;
|
m_resurrectMap = mapId;
|
||||||
m_resurrectX = X;
|
m_resurrectX = X;
|
||||||
m_resurrectY = Y;
|
m_resurrectY = Y;
|
||||||
|
|
@ -1744,9 +1744,9 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
m_resurrectHealth = health;
|
m_resurrectHealth = health;
|
||||||
m_resurrectMana = mana;
|
m_resurrectMana = mana;
|
||||||
}
|
}
|
||||||
void clearResurrectRequestData() { setResurrectRequestData(0,0,0.0f,0.0f,0.0f,0,0); }
|
void clearResurrectRequestData() { setResurrectRequestData(ObjectGuid(), 0, 0.0f, 0.0f, 0.0f, 0, 0); }
|
||||||
bool isRessurectRequestedBy(uint64 guid) const { return m_resurrectGUID == guid; }
|
bool isRessurectRequestedBy(ObjectGuid guid) const { return m_resurrectGuid == guid; }
|
||||||
bool isRessurectRequested() const { return m_resurrectGUID != 0; }
|
bool isRessurectRequested() const { return !m_resurrectGuid.IsEmpty(); }
|
||||||
void ResurectUsingRequestData();
|
void ResurectUsingRequestData();
|
||||||
|
|
||||||
int getCinematic()
|
int getCinematic()
|
||||||
|
|
@ -2549,7 +2549,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
EnchantDurationList m_enchantDuration;
|
EnchantDurationList m_enchantDuration;
|
||||||
ItemDurationList m_itemDuration;
|
ItemDurationList m_itemDuration;
|
||||||
|
|
||||||
uint64 m_resurrectGUID;
|
ObjectGuid m_resurrectGuid;
|
||||||
uint32 m_resurrectMap;
|
uint32 m_resurrectMap;
|
||||||
float m_resurrectX, m_resurrectY, m_resurrectZ;
|
float m_resurrectX, m_resurrectY, m_resurrectZ;
|
||||||
uint32 m_resurrectHealth, m_resurrectMana;
|
uint32 m_resurrectHealth, m_resurrectMana;
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ void WorldSession::SendNameQueryOpcode(Player *p)
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendNameQueryOpcodeFromDB(uint64 guid)
|
void WorldSession::SendNameQueryOpcodeFromDB(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
CharacterDatabase.AsyncPQuery(&WorldSession::SendNameQueryOpcodeFromDBCallBack, GetAccountId(),
|
CharacterDatabase.AsyncPQuery(&WorldSession::SendNameQueryOpcodeFromDBCallBack, GetAccountId(),
|
||||||
!sWorld.getConfig(CONFIG_BOOL_DECLINED_NAMES_USED) ?
|
!sWorld.getConfig(CONFIG_BOOL_DECLINED_NAMES_USED) ?
|
||||||
|
|
@ -73,7 +73,7 @@ void WorldSession::SendNameQueryOpcodeFromDB(uint64 guid)
|
||||||
// 5 6 7 8 9
|
// 5 6 7 8 9
|
||||||
"genitive, dative, accusative, instrumental, prepositional "
|
"genitive, dative, accusative, instrumental, prepositional "
|
||||||
"FROM characters LEFT JOIN character_declinedname ON characters.guid = character_declinedname.guid WHERE characters.guid = '%u'",
|
"FROM characters LEFT JOIN character_declinedname ON characters.guid = character_declinedname.guid WHERE characters.guid = '%u'",
|
||||||
GUID_LOPART(guid));
|
guid.GetCounter());
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendNameQueryOpcodeFromDBCallBack(QueryResult *result, uint32 accountId)
|
void WorldSession::SendNameQueryOpcodeFromDBCallBack(QueryResult *result, uint32 accountId)
|
||||||
|
|
@ -126,7 +126,7 @@ void WorldSession::SendNameQueryOpcodeFromDBCallBack(QueryResult *result, uint32
|
||||||
|
|
||||||
void WorldSession::HandleNameQueryOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleNameQueryOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
|
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
|
|
@ -148,7 +148,7 @@ void WorldSession::HandleCreatureQueryOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint32 entry;
|
uint32 entry;
|
||||||
recv_data >> entry;
|
recv_data >> entry;
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
CreatureInfo const *ci = ObjectMgr::GetCreatureTemplate(entry);
|
CreatureInfo const *ci = ObjectMgr::GetCreatureTemplate(entry);
|
||||||
|
|
@ -199,8 +199,8 @@ void WorldSession::HandleCreatureQueryOpcode( WorldPacket & recv_data )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (GUID: %u, ENTRY: %u)",
|
DEBUG_LOG("WORLD: CMSG_CREATURE_QUERY - Guid: %s Entry: %u NO CREATURE INFO!",
|
||||||
GUID_LOPART(guid), entry);
|
guid.GetString().c_str(), entry);
|
||||||
WorldPacket data( SMSG_CREATURE_QUERY_RESPONSE, 4 );
|
WorldPacket data( SMSG_CREATURE_QUERY_RESPONSE, 4 );
|
||||||
data << uint32(entry | 0x80000000);
|
data << uint32(entry | 0x80000000);
|
||||||
SendPacket( &data );
|
SendPacket( &data );
|
||||||
|
|
@ -213,7 +213,7 @@ void WorldSession::HandleGameObjectQueryOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint32 entryID;
|
uint32 entryID;
|
||||||
recv_data >> entryID;
|
recv_data >> entryID;
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
const GameObjectInfo *info = ObjectMgr::GetGameObjectInfo(entryID);
|
const GameObjectInfo *info = ObjectMgr::GetGameObjectInfo(entryID);
|
||||||
|
|
@ -258,8 +258,8 @@ void WorldSession::HandleGameObjectQueryOpcode( WorldPacket & recv_data )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (GUID: %u, ENTRY: %u)",
|
DEBUG_LOG("WORLD: CMSG_GAMEOBJECT_QUERY - Guid: %s Entry: %u Missing gameobject info!",
|
||||||
GUID_LOPART(guid), entryID );
|
guid.GetString().c_str(), entryID);
|
||||||
WorldPacket data ( SMSG_GAMEOBJECT_QUERY_RESPONSE, 4 );
|
WorldPacket data ( SMSG_GAMEOBJECT_QUERY_RESPONSE, 4 );
|
||||||
data << uint32(entryID | 0x80000000);
|
data << uint32(entryID | 0x80000000);
|
||||||
SendPacket( &data );
|
SendPacket( &data );
|
||||||
|
|
|
||||||
|
|
@ -82,16 +82,16 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode( WorldPacket & recv_data )
|
||||||
|
|
||||||
void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data)
|
void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data)
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
DEBUG_LOG ("WORLD: Received CMSG_QUESTGIVER_HELLO npc = %u", GUID_LOPART(guid));
|
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_HELLO npc: %s", guid.GetString().c_str());
|
||||||
|
|
||||||
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
|
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
|
||||||
|
|
||||||
if (!pCreature)
|
if (!pCreature)
|
||||||
{
|
{
|
||||||
DEBUG_LOG ("WORLD: HandleQuestgiverHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guid));
|
DEBUG_LOG ("WORLD: HandleQuestgiverHelloOpcode - %s not found or you can't interact with him.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,15 +112,15 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data)
|
||||||
|
|
||||||
void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
uint32 quest;
|
uint32 quest;
|
||||||
uint32 unk1;
|
uint32 unk1;
|
||||||
recv_data >> guid >> quest >> unk1;
|
recv_data >> guid >> quest >> unk1;
|
||||||
|
|
||||||
if(!GetPlayer()->isAlive())
|
if (!GetPlayer()->isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1 );
|
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %s, quest = %u, unk1 = %u", guid.GetString().c_str(), quest, unk1 );
|
||||||
|
|
||||||
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_GAMEOBJECT_PLAYER_OR_ITEM);
|
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_GAMEOBJECT_PLAYER_OR_ITEM);
|
||||||
|
|
||||||
|
|
@ -233,11 +233,12 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
||||||
|
|
||||||
void WorldSession::HandleQuestgiverQueryQuestOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleQuestgiverQueryQuestOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
uint32 quest;
|
uint32 quest;
|
||||||
uint8 unk1;
|
uint8 unk1;
|
||||||
recv_data >> guid >> quest >> unk1;
|
recv_data >> guid >> quest >> unk1;
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1 );
|
|
||||||
|
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %s, quest = %u, unk1 = %u", guid.GetString().c_str(), quest, unk1 );
|
||||||
|
|
||||||
// Verify that the guid is valid and is a questgiver or involved in the requested quest
|
// Verify that the guid is valid and is a questgiver or involved in the requested quest
|
||||||
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_GAMEOBJECT_OR_ITEM);
|
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_GAMEOBJECT_OR_ITEM);
|
||||||
|
|
@ -247,11 +248,8 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode( WorldPacket & recv_data )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest);
|
if (Quest const* pQuest = sObjectMgr.GetQuestTemplate(quest))
|
||||||
if ( pQuest )
|
_player->PlayerTalkClass->SendQuestGiverQuestDetails(pQuest, pObject->GetObjectGuid(), true);
|
||||||
{
|
|
||||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(pQuest, pObject->GetGUID(), true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleQuestQueryOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleQuestQueryOpcode( WorldPacket & recv_data )
|
||||||
|
|
@ -270,7 +268,7 @@ void WorldSession::HandleQuestQueryOpcode( WorldPacket & recv_data )
|
||||||
void WorldSession::HandleQuestgiverChooseRewardOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleQuestgiverChooseRewardOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint32 quest, reward;
|
uint32 quest, reward;
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid >> quest >> reward;
|
recv_data >> guid >> quest >> reward;
|
||||||
|
|
||||||
if(reward >= QUEST_REWARD_CHOICES_COUNT)
|
if(reward >= QUEST_REWARD_CHOICES_COUNT)
|
||||||
|
|
@ -282,7 +280,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode( WorldPacket & recv_data )
|
||||||
if(!GetPlayer()->isAlive())
|
if(!GetPlayer()->isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %u, quest = %u, reward = %u",uint32(GUID_LOPART(guid)),quest,reward );
|
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %s, quest = %u, reward = %u", guid.GetString().c_str(), quest, reward);
|
||||||
|
|
||||||
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_OR_GAMEOBJECT);
|
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_OR_GAMEOBJECT);
|
||||||
if(!pObject)
|
if(!pObject)
|
||||||
|
|
@ -301,51 +299,51 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode( WorldPacket & recv_data )
|
||||||
switch(pObject->GetTypeId())
|
switch(pObject->GetTypeId())
|
||||||
{
|
{
|
||||||
case TYPEID_UNIT:
|
case TYPEID_UNIT:
|
||||||
if( !(Script->ChooseReward( _player, ((Creature*)pObject), pQuest, reward )) )
|
if (!(Script->ChooseReward(_player, ((Creature*)pObject), pQuest, reward)))
|
||||||
{
|
{
|
||||||
// Send next quest
|
// Send next quest
|
||||||
if(Quest const* nextquest = _player->GetNextQuest( guid ,pQuest ) )
|
if (Quest const* nextquest = _player->GetNextQuest(guid, pQuest))
|
||||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest,guid,true);
|
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest, guid, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPEID_GAMEOBJECT:
|
case TYPEID_GAMEOBJECT:
|
||||||
if( !Script->GOChooseReward( _player, ((GameObject*)pObject), pQuest, reward ) )
|
if (!Script->GOChooseReward(_player, ((GameObject*)pObject), pQuest, reward))
|
||||||
{
|
{
|
||||||
// Send next quest
|
// Send next quest
|
||||||
if(Quest const* nextquest = _player->GetNextQuest( guid ,pQuest ) )
|
if (Quest const* nextquest = _player->GetNextQuest(guid ,pQuest))
|
||||||
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest,guid,true);
|
_player->PlayerTalkClass->SendQuestGiverQuestDetails(nextquest, guid, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_player->PlayerTalkClass->SendQuestGiverOfferReward( pQuest, guid, true );
|
_player->PlayerTalkClass->SendQuestGiverOfferReward(pQuest, guid, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleQuestgiverRequestRewardOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleQuestgiverRequestRewardOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint32 quest;
|
uint32 quest;
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid >> quest;
|
recv_data >> guid >> quest;
|
||||||
|
|
||||||
if(!GetPlayer()->isAlive())
|
if (!GetPlayer()->isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest );
|
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %s, quest = %u", guid.GetString().c_str(), quest);
|
||||||
|
|
||||||
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_OR_GAMEOBJECT);
|
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_OR_GAMEOBJECT);
|
||||||
if(!pObject||!pObject->HasInvolvedQuest(quest))
|
if (!pObject||!pObject->HasInvolvedQuest(quest))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( _player->CanCompleteQuest( quest ) )
|
if (_player->CanCompleteQuest(quest))
|
||||||
_player->CompleteQuest( quest );
|
_player->CompleteQuest(quest);
|
||||||
|
|
||||||
if( _player->GetQuestStatus( quest ) != QUEST_STATUS_COMPLETE )
|
if (_player->GetQuestStatus(quest) != QUEST_STATUS_COMPLETE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest))
|
if (Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest))
|
||||||
_player->PlayerTalkClass->SendQuestGiverOfferReward( pQuest, guid, true );
|
_player->PlayerTalkClass->SendQuestGiverOfferReward(pQuest, guid, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleQuestgiverCancel(WorldPacket& /*recv_data*/ )
|
void WorldSession::HandleQuestgiverCancel(WorldPacket& /*recv_data*/ )
|
||||||
|
|
@ -435,27 +433,26 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
|
||||||
void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
|
void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
uint32 quest;
|
uint32 quest;
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid >> quest;
|
recv_data >> guid >> quest;
|
||||||
|
|
||||||
if(!GetPlayer()->isAlive())
|
if (!GetPlayer()->isAlive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest );
|
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %s, quest = %u", guid.GetString().c_str(), quest);
|
||||||
|
|
||||||
Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
|
if (Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest))
|
||||||
if( pQuest )
|
|
||||||
{
|
{
|
||||||
if( _player->GetQuestStatus( quest ) != QUEST_STATUS_COMPLETE )
|
if (_player->GetQuestStatus( quest ) != QUEST_STATUS_COMPLETE)
|
||||||
{
|
{
|
||||||
if( pQuest->IsRepeatable() )
|
if (pQuest->IsRepeatable())
|
||||||
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanCompleteRepeatableQuest(pQuest), false);
|
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanCompleteRepeatableQuest(pQuest), false);
|
||||||
else
|
else
|
||||||
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanRewardQuest(pQuest,false), false);
|
_player->PlayerTalkClass->SendQuestGiverRequestItems(pQuest, guid, _player->CanRewardQuest(pQuest,false), false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(pQuest->GetReqItemsCount()) // some items required
|
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
|
else // no items required
|
||||||
_player->PlayerTalkClass->SendQuestGiverOfferReward(pQuest, guid, true);
|
_player->PlayerTalkClass->SendQuestGiverOfferReward(pQuest, guid, true);
|
||||||
|
|
@ -518,7 +515,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
pPlayer->PlayerTalkClass->SendQuestGiverQuestDetails(pQuest, _player->GetGUID(), true);
|
pPlayer->PlayerTalkClass->SendQuestGiverQuestDetails(pQuest, _player->GetObjectGuid(), true);
|
||||||
pPlayer->SetDivider(_player->GetGUID());
|
pPlayer->SetDivider(_player->GetGUID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -527,19 +524,18 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
|
||||||
|
|
||||||
void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket)
|
void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket)
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
uint8 msg;
|
uint8 msg;
|
||||||
recvPacket >> guid >> msg;
|
recvPacket >> guid >> msg;
|
||||||
|
|
||||||
DEBUG_LOG( "WORLD: Received MSG_QUEST_PUSH_RESULT" );
|
DEBUG_LOG("WORLD: Received MSG_QUEST_PUSH_RESULT");
|
||||||
|
|
||||||
if( _player->GetDivider() != 0 )
|
if (_player->GetDivider() != 0)
|
||||||
{
|
{
|
||||||
Player *pPlayer = ObjectAccessor::FindPlayer( _player->GetDivider() );
|
if (Player *pPlayer = ObjectAccessor::FindPlayer(_player->GetDivider()))
|
||||||
if( pPlayer )
|
|
||||||
{
|
{
|
||||||
WorldPacket data( MSG_QUEST_PUSH_RESULT, (8+1) );
|
WorldPacket data( MSG_QUEST_PUSH_RESULT, (8+1) );
|
||||||
data << uint64(guid);
|
data << ObjectGuid(guid);
|
||||||
data << uint8(msg); // valid values: 0-8
|
data << uint8(msg); // valid values: 0-8
|
||||||
pPlayer->GetSession()->SendPacket(&data);
|
pPlayer->GetSession()->SendPacket(&data);
|
||||||
_player->SetDivider( 0 );
|
_player->SetDivider( 0 );
|
||||||
|
|
|
||||||
|
|
@ -56,21 +56,21 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
|
||||||
void WorldSession::HandleTalentWipeConfirmOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleTalentWipeConfirmOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
DETAIL_LOG("MSG_TALENT_WIPE_CONFIRM");
|
DETAIL_LOG("MSG_TALENT_WIPE_CONFIRM");
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TRAINER);
|
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
|
||||||
if (!unit)
|
if (!unit)
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
|
DEBUG_LOG( "WORLD: HandleTalentWipeConfirmOpcode - %s not found or you can't interact with him.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove fake death
|
// remove fake death
|
||||||
if(GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||||
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
||||||
|
|
||||||
if(!(_player->resetTalents()))
|
if (!(_player->resetTalents()))
|
||||||
{
|
{
|
||||||
WorldPacket data( MSG_TALENT_WIPE_CONFIRM, 8+4); //you have not any talent
|
WorldPacket data( MSG_TALENT_WIPE_CONFIRM, 8+4); //you have not any talent
|
||||||
data << uint64(0);
|
data << uint64(0);
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ void Spell::EffectResurrectNew(SpellEffectIndex eff_idx)
|
||||||
|
|
||||||
uint32 health = damage;
|
uint32 health = damage;
|
||||||
uint32 mana = m_spellInfo->EffectMiscValue[eff_idx];
|
uint32 mana = m_spellInfo->EffectMiscValue[eff_idx];
|
||||||
pTarget->setResurrectRequestData(m_caster->GetGUID(), m_caster->GetMapId(), m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), health, mana);
|
pTarget->setResurrectRequestData(m_caster->GetObjectGuid(), m_caster->GetMapId(), m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), health, mana);
|
||||||
SendResurrectRequest(pTarget);
|
SendResurrectRequest(pTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7239,7 +7239,7 @@ void Spell::EffectResurrect(SpellEffectIndex /*eff_idx*/)
|
||||||
uint32 health = pTarget->GetMaxHealth() * damage / 100;
|
uint32 health = pTarget->GetMaxHealth() * damage / 100;
|
||||||
uint32 mana = pTarget->GetMaxPower(POWER_MANA) * damage / 100;
|
uint32 mana = pTarget->GetMaxPower(POWER_MANA) * damage / 100;
|
||||||
|
|
||||||
pTarget->setResurrectRequestData(m_caster->GetGUID(), m_caster->GetMapId(), m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), health, mana);
|
pTarget->setResurrectRequestData(m_caster->GetObjectGuid(), m_caster->GetMapId(), m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ(), health, mana);
|
||||||
SendResurrectRequest(pTarget);
|
SendResurrectRequest(pTarget);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -270,11 +270,11 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
|
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
DEBUG_LOG( "WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid));
|
DEBUG_LOG("WORLD: Recvd CMSG_GAMEOBJ_USE Message guid: %s", guid.GetString().c_str());
|
||||||
|
|
||||||
// ignore for remote control state
|
// ignore for remote control state
|
||||||
if (!_player->IsSelfMover())
|
if (!_player->IsSelfMover())
|
||||||
|
|
@ -297,17 +297,17 @@ void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data )
|
||||||
|
|
||||||
void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket)
|
void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket)
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recvPacket >> guid;
|
recvPacket >> guid;
|
||||||
|
|
||||||
DEBUG_LOG( "WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [in game guid: %u]", GUID_LOPART(guid));
|
DEBUG_LOG("WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message guid: %s", guid.GetString().c_str());
|
||||||
|
|
||||||
// ignore for remote control state
|
// ignore for remote control state
|
||||||
if (!_player->IsSelfMover())
|
if (!_player->IsSelfMover())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GameObject* go = GetPlayer()->GetMap()->GetGameObject(guid);
|
GameObject* go = GetPlayer()->GetMap()->GetGameObject(guid);
|
||||||
if(!go)
|
if (!go)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(!go->IsWithinDistInMap(_player,INTERACTION_DISTANCE))
|
if(!go->IsWithinDistInMap(_player,INTERACTION_DISTANCE))
|
||||||
|
|
@ -484,7 +484,7 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
|
||||||
|
|
||||||
void WorldSession::HandlePetCancelAuraOpcode( WorldPacket& recvPacket)
|
void WorldSession::HandlePetCancelAuraOpcode( WorldPacket& recvPacket)
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
uint32 spellId;
|
uint32 spellId;
|
||||||
|
|
||||||
recvPacket >> guid;
|
recvPacket >> guid;
|
||||||
|
|
@ -503,15 +503,15 @@ void WorldSession::HandlePetCancelAuraOpcode( WorldPacket& recvPacket)
|
||||||
|
|
||||||
Creature* pet = GetPlayer()->GetMap()->GetAnyTypeCreature(guid);
|
Creature* pet = GetPlayer()->GetMap()->GetAnyTypeCreature(guid);
|
||||||
|
|
||||||
if(!pet)
|
if (!pet)
|
||||||
{
|
{
|
||||||
sLog.outError( "Pet %u not exist.", uint32(GUID_LOPART(guid)) );
|
sLog.outError("HandlePetCancelAuraOpcode - %s not exist.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pet != GetPlayer()->GetPet() && pet != GetPlayer()->GetCharm())
|
if (guid.GetRawValue() != GetPlayer()->GetPetGUID() && guid.GetRawValue() != GetPlayer()->GetCharmGUID())
|
||||||
{
|
{
|
||||||
sLog.outError( "HandlePetCancelAura.Pet %u isn't pet of player %s", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
|
sLog.outError("HandlePetCancelAura. %s isn't pet of %s", guid.GetString().c_str(), GetPlayer()->GetObjectGuid().GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -583,7 +583,7 @@ void WorldSession::HandleSelfResOpcode( WorldPacket & /*recv_data*/ )
|
||||||
|
|
||||||
void WorldSession::HandleSpellClick( WorldPacket & recv_data )
|
void WorldSession::HandleSpellClick( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
if (_player->isInCombat()) // client prevent click and set different icon at combat state
|
if (_player->isInCombat()) // client prevent click and set different icon at combat state
|
||||||
|
|
|
||||||
|
|
@ -31,51 +31,52 @@
|
||||||
|
|
||||||
void WorldSession::HandleTaxiNodeStatusQueryOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleTaxiNodeStatusQueryOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_TAXINODE_STATUS_QUERY" );
|
DEBUG_LOG("WORLD: Received CMSG_TAXINODE_STATUS_QUERY");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
|
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
SendTaxiStatus( guid );
|
SendTaxiStatus( guid );
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::SendTaxiStatus( uint64 guid )
|
void WorldSession::SendTaxiStatus(ObjectGuid guid)
|
||||||
{
|
{
|
||||||
// cheating checks
|
// cheating checks
|
||||||
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
|
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
|
||||||
if (!unit)
|
if (!unit)
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WorldSession::SendTaxiStatus - Unit (GUID: %u) not found.", uint32(GUID_LOPART(guid)) );
|
DEBUG_LOG("WorldSession::SendTaxiStatus - %s not found or you can't interact with it.", guid.GetString().c_str());
|
||||||
return;
|
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
|
// not found nearest
|
||||||
if(curloc == 0)
|
if (curloc == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
DEBUG_LOG( "WORLD: current location %u ",curloc);
|
DEBUG_LOG("WORLD: current location %u ",curloc);
|
||||||
|
|
||||||
WorldPacket data( SMSG_TAXINODE_STATUS, 9 );
|
WorldPacket data(SMSG_TAXINODE_STATUS, 9);
|
||||||
data << guid;
|
data << ObjectGuid(guid);
|
||||||
data << uint8( GetPlayer( )->m_taxi.IsTaximaskNodeKnown(curloc) ? 1 : 0 );
|
data << uint8(GetPlayer()->m_taxi.IsTaximaskNodeKnown(curloc) ? 1 : 0);
|
||||||
SendPacket( &data );
|
SendPacket(&data);
|
||||||
DEBUG_LOG( "WORLD: Sent SMSG_TAXINODE_STATUS" );
|
|
||||||
|
DEBUG_LOG("WORLD: Sent SMSG_TAXINODE_STATUS");
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleTaxiQueryAvailableNodes( WorldPacket & recv_data )
|
void WorldSession::HandleTaxiQueryAvailableNodes( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_TAXIQUERYAVAILABLENODES" );
|
DEBUG_LOG( "WORLD: Received CMSG_TAXIQUERYAVAILABLENODES" );
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
recv_data >> guid;
|
recv_data >> guid;
|
||||||
|
|
||||||
// cheating checks
|
// cheating checks
|
||||||
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||||
if (!unit)
|
if (!unit)
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: HandleTaxiQueryAvailableNodes - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
|
DEBUG_LOG("WORLD: HandleTaxiQueryAvailableNodes - %s not found or you can't interact with him.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -154,7 +155,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode ( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_ACTIVATETAXIEXPRESS" );
|
DEBUG_LOG( "WORLD: Received CMSG_ACTIVATETAXIEXPRESS" );
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
uint32 node_count;
|
uint32 node_count;
|
||||||
|
|
||||||
recv_data >> guid >> node_count;
|
recv_data >> guid >> node_count;
|
||||||
|
|
@ -162,7 +163,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode ( WorldPacket & recv_data )
|
||||||
Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||||
if (!npc)
|
if (!npc)
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: HandleActivateTaxiExpressOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)) );
|
DEBUG_LOG( "WORLD: HandleActivateTaxiExpressOpcode - %s not found or you can't interact with it.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::vector<uint32> nodes;
|
std::vector<uint32> nodes;
|
||||||
|
|
@ -257,18 +258,18 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
|
||||||
|
|
||||||
void WorldSession::HandleActivateTaxiOpcode( WorldPacket & recv_data )
|
void WorldSession::HandleActivateTaxiOpcode( WorldPacket & recv_data )
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_ACTIVATETAXI" );
|
DEBUG_LOG("WORLD: Received CMSG_ACTIVATETAXI");
|
||||||
|
|
||||||
uint64 guid;
|
ObjectGuid guid;
|
||||||
std::vector<uint32> nodes;
|
std::vector<uint32> nodes;
|
||||||
nodes.resize(2);
|
nodes.resize(2);
|
||||||
|
|
||||||
recv_data >> guid >> nodes[0] >> nodes[1];
|
recv_data >> guid >> nodes[0] >> nodes[1];
|
||||||
DEBUG_LOG( "WORLD: Received CMSG_ACTIVATETAXI from %d to %d" ,nodes[0],nodes[1]);
|
DEBUG_LOG("WORLD: Received CMSG_ACTIVATETAXI from %d to %d" ,nodes[0],nodes[1]);
|
||||||
Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||||
if (!npc)
|
if (!npc)
|
||||||
{
|
{
|
||||||
DEBUG_LOG( "WORLD: HandleActivateTaxiOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)) );
|
DEBUG_LOG("WORLD: HandleActivateTaxiOpcode - %s not found or you can't interact with it.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include "Common.h"
|
#include "Common.h"
|
||||||
#include "SharedDefines.h"
|
#include "SharedDefines.h"
|
||||||
|
#include "ObjectGuid.h"
|
||||||
|
|
||||||
struct ItemPrototype;
|
struct ItemPrototype;
|
||||||
struct AuctionEntry;
|
struct AuctionEntry;
|
||||||
|
|
@ -206,16 +207,16 @@ class MANGOS_DLL_SPEC WorldSession
|
||||||
/// Handle the authentication waiting queue (to be completed)
|
/// Handle the authentication waiting queue (to be completed)
|
||||||
void SendAuthWaitQue(uint32 position);
|
void SendAuthWaitQue(uint32 position);
|
||||||
|
|
||||||
//void SendTestCreatureQueryOpcode( uint32 entry, uint64 guid, uint32 testvalue );
|
|
||||||
void SendNameQueryOpcode(Player* p);
|
void SendNameQueryOpcode(Player* p);
|
||||||
void SendNameQueryOpcodeFromDB(uint64 guid);
|
void SendNameQueryOpcodeFromDB(ObjectGuid guid);
|
||||||
static void SendNameQueryOpcodeFromDBCallBack(QueryResult *result, uint32 accountId);
|
static void SendNameQueryOpcodeFromDBCallBack(QueryResult *result, uint32 accountId);
|
||||||
|
|
||||||
void SendTrainerList( uint64 guid );
|
void SendTrainerList(ObjectGuid guid);
|
||||||
void SendTrainerList( uint64 guid, const std::string& strTitle );
|
void SendTrainerList(ObjectGuid guid, const std::string& strTitle );
|
||||||
void SendListInventory( uint64 guid );
|
void SendListInventory(ObjectGuid guid);
|
||||||
void SendShowBank( uint64 guid );
|
bool CheckBanker(ObjectGuid guid);
|
||||||
void SendTabardVendorActivate( uint64 guid );
|
void SendShowBank(ObjectGuid guid);
|
||||||
|
void SendTabardVendorActivate(ObjectGuid guid);
|
||||||
void SendSpiritResurrect();
|
void SendSpiritResurrect();
|
||||||
void SendBindPoint(Creature* npc);
|
void SendBindPoint(Creature* npc);
|
||||||
void SendGMTicketGetTicket(uint32 status, GMTicket *ticket = NULL);
|
void SendGMTicketGetTicket(uint32 status, GMTicket *ticket = NULL);
|
||||||
|
|
@ -277,7 +278,7 @@ class MANGOS_DLL_SPEC WorldSession
|
||||||
void SendItemEnchantTimeUpdate(uint64 Playerguid, uint64 Itemguid,uint32 slot,uint32 Duration);
|
void SendItemEnchantTimeUpdate(uint64 Playerguid, uint64 Itemguid,uint32 slot,uint32 Duration);
|
||||||
|
|
||||||
//Taxi
|
//Taxi
|
||||||
void SendTaxiStatus( uint64 guid );
|
void SendTaxiStatus(ObjectGuid guid);
|
||||||
void SendTaxiMenu( Creature* unit );
|
void SendTaxiMenu( Creature* unit );
|
||||||
void SendDoFlight( uint32 mountDisplayId, uint32 path, uint32 pathNode = 0 );
|
void SendDoFlight( uint32 mountDisplayId, uint32 path, uint32 pathNode = 0 );
|
||||||
bool SendLearnNewTaxiNode( Creature* unit );
|
bool SendLearnNewTaxiNode( Creature* unit );
|
||||||
|
|
@ -286,7 +287,7 @@ class MANGOS_DLL_SPEC WorldSession
|
||||||
void SendGuildCommandResult(uint32 typecmd, const std::string& str, uint32 cmdresult);
|
void SendGuildCommandResult(uint32 typecmd, const std::string& str, uint32 cmdresult);
|
||||||
void SendArenaTeamCommandResult(uint32 team_action, const std::string& team, const std::string& player, uint32 error_id);
|
void SendArenaTeamCommandResult(uint32 team_action, const std::string& team, const std::string& player, uint32 error_id);
|
||||||
void SendNotInArenaTeamPacket(uint8 type);
|
void SendNotInArenaTeamPacket(uint8 type);
|
||||||
void SendPetitionShowList( uint64 guid );
|
void SendPetitionShowList(ObjectGuid guid);
|
||||||
void SendSaveGuildEmblem( uint32 msg );
|
void SendSaveGuildEmblem( uint32 msg );
|
||||||
|
|
||||||
// Looking For Group
|
// Looking For Group
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10634"
|
#define REVISION_NR "10635"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue