Mangos [7911]. Author: tomrus88
Very big patch. May cause bugs. --HG-- branch : trunk
This commit is contained in:
@@ -1536,7 +1536,7 @@ void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement)
|
||||
return;
|
||||
|
||||
// titles
|
||||
if(uint32 titleId = reward->titleId[GetPlayer()->GetTeam() == HORDE?0:1])
|
||||
if(uint32 titleId = reward->titleId[GetPlayer()->GetTeam() == HORDE ? 0 : 1])
|
||||
{
|
||||
if(CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(titleId))
|
||||
GetPlayer()->SetTitle(titleEntry);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "World.h"
|
||||
#include "SocialMgr.h"
|
||||
|
||||
void WorldSession::HandleInspectArenaStatsOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
sLog.outDebug("MSG_INSPECT_ARENA_TEAMS");
|
||||
|
||||
@@ -84,9 +84,9 @@ void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recv_data)
|
||||
arenateam->Roster(this);
|
||||
}
|
||||
|
||||
void WorldSession::HandleArenaTeamAddMemberOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
sLog.outDebug("CMSG_ARENA_TEAM_ADD_MEMBER");
|
||||
sLog.outDebug("CMSG_ARENA_TEAM_INVITE");
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, 4+1);
|
||||
|
||||
@@ -164,9 +164,9 @@ void WorldSession::HandleArenaTeamAddMemberOpcode(WorldPacket & recv_data)
|
||||
sLog.outDebug("WORLD: Sent SMSG_ARENA_TEAM_INVITE");
|
||||
}
|
||||
|
||||
void WorldSession::HandleArenaTeamInviteAcceptOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
|
||||
{
|
||||
sLog.outDebug("CMSG_ARENA_TEAM_INVITE_ACCEPT"); // empty opcode
|
||||
sLog.outDebug("CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
|
||||
|
||||
ArenaTeam *at = objmgr.GetArenaTeamById(_player->GetArenaTeamIdInvited());
|
||||
if(!at)
|
||||
@@ -196,9 +196,9 @@ void WorldSession::HandleArenaTeamInviteAcceptOpcode(WorldPacket & /*recv_data*/
|
||||
at->BroadcastPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleArenaTeamInviteDeclineOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket & /*recv_data*/)
|
||||
{
|
||||
sLog.outDebug("CMSG_ARENA_TEAM_INVITE_DECLINE"); // empty opcode
|
||||
sLog.outDebug("CMSG_ARENA_TEAM_DECLINE"); // empty opcode
|
||||
|
||||
_player->SetArenaTeamIdInvited(0); // no more invited
|
||||
}
|
||||
@@ -263,9 +263,9 @@ void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recv_data)
|
||||
delete at;
|
||||
}
|
||||
|
||||
void WorldSession::HandleArenaTeamRemoveFromTeamOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
sLog.outDebug("CMSG_ARENA_TEAM_REMOVE_FROM_TEAM");
|
||||
sLog.outDebug("CMSG_ARENA_TEAM_REMOVE");
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, 4+1);
|
||||
|
||||
@@ -309,9 +309,9 @@ void WorldSession::HandleArenaTeamRemoveFromTeamOpcode(WorldPacket & recv_data)
|
||||
at->BroadcastPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleArenaTeamPromoteToCaptainOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
sLog.outDebug("CMSG_ARENA_TEAM_PROMOTE_TO_CAPTAIN");
|
||||
sLog.outDebug("CMSG_ARENA_TEAM_LEADER");
|
||||
|
||||
CHECK_PACKET_SIZE(recv_data, 4+1);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "ArenaTeam.h"
|
||||
#include "Language.h"
|
||||
|
||||
void WorldSession::HandleBattleGroundHelloOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleBattlemasterHelloOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8);
|
||||
|
||||
@@ -71,7 +71,7 @@ void WorldSession::SendBattlegGroundList( uint64 guid, BattleGroundTypeId bgType
|
||||
SendPacket( &data );
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattleGroundJoinOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8+4+4+1);
|
||||
|
||||
@@ -272,7 +272,7 @@ void WorldSession::HandleBattleGroundPlayerPositionsOpcode( WorldPacket & /*recv
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattleGroundPVPlogdataOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandlePVPLogDataOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
sLog.outDebug( "WORLD: Recvd MSG_PVP_LOG_DATA Message");
|
||||
|
||||
@@ -287,7 +287,7 @@ void WorldSession::HandleBattleGroundPVPlogdataOpcode( WorldPacket & /*recv_data
|
||||
sLog.outDebug( "WORLD: Sent MSG_PVP_LOG_DATA Message");
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattleGroundListOpcode( WorldPacket &recv_data )
|
||||
void WorldSession::HandleBattlefieldListOpcode( WorldPacket &recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4);
|
||||
|
||||
@@ -308,7 +308,7 @@ void WorldSession::HandleBattleGroundListOpcode( WorldPacket &recv_data )
|
||||
SendPacket( &data );
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattleGroundPlayerPortOpcode( WorldPacket &recv_data )
|
||||
void WorldSession::HandleBattleFieldPortOpcode( WorldPacket &recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 1+1+4+2+1);
|
||||
|
||||
@@ -504,7 +504,7 @@ void WorldSession::HandleBattleGroundPlayerPortOpcode( WorldPacket &recv_data )
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattleGroundLeaveOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleLeaveBattlefieldOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
//CHECK_PACKET_SIZE(recv_data, 1+1+4+2);
|
||||
|
||||
@@ -632,7 +632,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode( WorldPacket & recv_data )
|
||||
bg->AddPlayerToResurrectQueue(guid, _player->GetGUID());
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattleGroundArenaJoin( WorldPacket & recv_data )
|
||||
void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8+1+1+1);
|
||||
|
||||
@@ -673,7 +673,7 @@ void WorldSession::HandleBattleGroundArenaJoin( WorldPacket & recv_data )
|
||||
arenatype = ARENA_TYPE_5v5;
|
||||
break;
|
||||
default:
|
||||
sLog.outError("Unknown arena slot %u at HandleBattleGroundArenaJoin()", arenaslot);
|
||||
sLog.outError("Unknown arena slot %u at HandleBattlemasterJoinArena()", arenaslot);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -793,7 +793,7 @@ void WorldSession::HandleBattleGroundArenaJoin( WorldPacket & recv_data )
|
||||
sBattleGroundMgr.m_BattleGroundQueues[bgQueueTypeId].Update(bgTypeId, _player->GetBattleGroundQueueIdFromLevel(bgTypeId), arenatype, isRated, arenaRating);
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattleGroundReportAFK( WorldPacket & recv_data )
|
||||
void WorldSession::HandleReportPvPAFK( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8);
|
||||
|
||||
@@ -803,11 +803,11 @@ void WorldSession::HandleBattleGroundReportAFK( WorldPacket & recv_data )
|
||||
|
||||
if (!reportedPlayer)
|
||||
{
|
||||
sLog.outDebug("WorldSession::HandleBattleGroundReportAFK: player not found");
|
||||
sLog.outDebug("WorldSession::HandleReportPvPAFK: player not found");
|
||||
return;
|
||||
}
|
||||
|
||||
sLog.outDebug("WorldSession::HandleBattleGroundReportAFK: %s reported %s", _player->GetName(), reportedPlayer->GetName());
|
||||
sLog.outDebug("WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName(), reportedPlayer->GetName());
|
||||
|
||||
reportedPlayer->ReportedAfkBy(_player);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
INSTANTIATE_SINGLETON_1( AllianceChannelMgr );
|
||||
INSTANTIATE_SINGLETON_1( HordeChannelMgr );
|
||||
|
||||
void WorldSession::HandleChannelJoin(WorldPacket& recvPacket)
|
||||
void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
|
||||
//recvPacket.hexlike();
|
||||
@@ -50,7 +50,7 @@ void WorldSession::HandleChannelJoin(WorldPacket& recvPacket)
|
||||
chn->Join(_player->GetGUID(), pass.c_str());
|
||||
}
|
||||
|
||||
void WorldSession::HandleChannelLeave(WorldPacket& recvPacket)
|
||||
void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
|
||||
//recvPacket.hexlike();
|
||||
@@ -315,7 +315,7 @@ void WorldSession::HandleChannelUnban(WorldPacket& recvPacket)
|
||||
chn->UnBan(_player->GetGUID(), otp.c_str());
|
||||
}
|
||||
|
||||
void WorldSession::HandleChannelAnnounce(WorldPacket& recvPacket)
|
||||
void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
|
||||
//recvPacket.hexlike();
|
||||
@@ -341,7 +341,7 @@ void WorldSession::HandleChannelModerate(WorldPacket& recvPacket)
|
||||
chn->Moderate(_player->GetGUID());
|
||||
}
|
||||
|
||||
void WorldSession::HandleChannelRosterQuery(WorldPacket &recvPacket)
|
||||
void WorldSession::HandleChannelDisplayListQuery(WorldPacket &recvPacket)
|
||||
{
|
||||
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
|
||||
//recvPacket.hexlike();
|
||||
@@ -354,7 +354,7 @@ void WorldSession::HandleChannelRosterQuery(WorldPacket &recvPacket)
|
||||
chn->List(_player);
|
||||
}
|
||||
|
||||
void WorldSession::HandleChannelInfoQuery(WorldPacket &recvPacket)
|
||||
void WorldSession::HandleGetChannelMemberCount(WorldPacket &recvPacket)
|
||||
{
|
||||
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
|
||||
//recvPacket.hexlike();
|
||||
@@ -375,7 +375,7 @@ void WorldSession::HandleChannelInfoQuery(WorldPacket &recvPacket)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleChannelJoinNotify(WorldPacket &recvPacket)
|
||||
void WorldSession::HandleSetChannelWatch(WorldPacket &recvPacket)
|
||||
{
|
||||
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
|
||||
//recvPacket.hexlike();
|
||||
|
||||
@@ -942,7 +942,7 @@ void WorldSession::HandleTutorialReset( WorldPacket & /*recv_data*/ )
|
||||
GetPlayer()->SetTutorialInt( i, 0x00000000 );
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetWatchedFactionIndexOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,4);
|
||||
|
||||
@@ -952,7 +952,7 @@ void WorldSession::HandleSetWatchedFactionIndexOpcode(WorldPacket & recv_data)
|
||||
GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetWatchedFactionInactiveOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,4+1);
|
||||
|
||||
@@ -964,19 +964,19 @@ void WorldSession::HandleSetWatchedFactionInactiveOpcode(WorldPacket & recv_data
|
||||
_player->GetReputationMgr().SetInactive(replistid, inactive);
|
||||
}
|
||||
|
||||
void WorldSession::HandleToggleHelmOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleShowingHelmOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
DEBUG_LOG("CMSG_TOGGLE_HELM for %s", _player->GetName());
|
||||
DEBUG_LOG("CMSG_SHOWING_HELM for %s", _player->GetName());
|
||||
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM);
|
||||
}
|
||||
|
||||
void WorldSession::HandleToggleCloakOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleShowingCloakOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
DEBUG_LOG("CMSG_TOGGLE_CLOAK for %s", _player->GetName());
|
||||
DEBUG_LOG("CMSG_SHOWING_CLOAK for %s", _player->GetName());
|
||||
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK);
|
||||
}
|
||||
|
||||
void WorldSession::HandleChangePlayerNameOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8+1);
|
||||
|
||||
@@ -1059,7 +1059,7 @@ void WorldSession::HandleChangePlayerNameOpcodeCallBack(QueryResult *result, uin
|
||||
session->SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleDeclinedPlayerNameOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
|
||||
{
|
||||
uint64 guid;
|
||||
|
||||
|
||||
@@ -756,7 +756,8 @@ struct CurrencyTypesEntry
|
||||
{
|
||||
//uint32 ID; // 0 not used
|
||||
uint32 ItemId; // 1 used as real index
|
||||
uint32 BitIndex; // 2 bit index in PLAYER_FIELD_KNOWN_CURRENCIES (1 << (index-1))
|
||||
//uint32 Category; // 2 may be category
|
||||
uint32 BitIndex; // 3 bit index in PLAYER_FIELD_KNOWN_CURRENCIES (1 << (index-1))
|
||||
};
|
||||
|
||||
struct DurabilityCostsEntry
|
||||
@@ -1038,8 +1039,8 @@ struct ItemLimitCategoryEntry
|
||||
uint32 ID; // 0 Id
|
||||
//char* name[16] // 1-16 m_name_lang
|
||||
// 17 name flags
|
||||
uint32 maxCount; // max allowed equipped as item or in gem slot
|
||||
//uint32 unk; // 1 for prismatic gems only...
|
||||
uint32 maxCount; // 18, max allowed equipped as item or in gem slot
|
||||
//uint32 unk; // 19, 1 for gems only...
|
||||
};
|
||||
|
||||
struct ItemRandomPropertiesEntry
|
||||
|
||||
@@ -105,6 +105,7 @@ struct GameObjectInfo
|
||||
uint32 openTextID; //14 can be used to replace castBarCaption?
|
||||
uint32 groupLootRules; //15
|
||||
} chest;
|
||||
//4 GAMEOBJECT_TYPE_BINDER - empty
|
||||
//5 GAMEOBJECT_TYPE_GENERIC
|
||||
struct
|
||||
{
|
||||
@@ -207,6 +208,7 @@ struct GameObjectInfo
|
||||
uint32 eventID; //2
|
||||
uint32 openTextID; //3 can be used to replace castBarCaption?
|
||||
} camera;
|
||||
//14 GAMEOBJECT_TYPE_MAPOBJECT - empty
|
||||
//15 GAMEOBJECT_TYPE_MO_TRANSPORT
|
||||
struct
|
||||
{
|
||||
@@ -218,6 +220,7 @@ struct GameObjectInfo
|
||||
uint32 transportPhysics; //5
|
||||
uint32 mapID; //6
|
||||
} moTransport;
|
||||
//16 GAMEOBJECT_TYPE_DUELFLAG - empty
|
||||
//17 GAMEOBJECT_TYPE_FISHINGNODE
|
||||
struct
|
||||
{
|
||||
@@ -236,6 +239,7 @@ struct GameObjectInfo
|
||||
uint32 castersGrouped; //6
|
||||
uint32 ritualNoTargetCheck; //7
|
||||
} summoningRitual;
|
||||
//19 GAMEOBJECT_TYPE_MAILBOX - empty
|
||||
//20 GAMEOBJECT_TYPE_AUCTIONHOUSE
|
||||
struct
|
||||
{
|
||||
@@ -358,7 +362,8 @@ struct GameObjectInfo
|
||||
uint32 unk9;
|
||||
uint32 destroyedDisplayId; //10
|
||||
} destructibleBuilding;
|
||||
//34 GAMEOBJECT_TYPE_TRAPDOOR
|
||||
//34 GAMEOBJECT_TYPE_GUILDBANK - empty
|
||||
//35 GAMEOBJECT_TYPE_TRAPDOOR
|
||||
struct
|
||||
{
|
||||
uint32 whenToPause; // 0
|
||||
@@ -367,7 +372,7 @@ struct GameObjectInfo
|
||||
} trapDoor;
|
||||
|
||||
// not use for specific field access (only for output with loop by all filed), also this determinate max union size
|
||||
struct // GAMEOBJECT_TYPE_SPELLCASTER
|
||||
struct
|
||||
{
|
||||
uint32 data[24];
|
||||
} raw;
|
||||
|
||||
@@ -152,7 +152,7 @@ void PlayerMenu::SendGossipMenu( uint32 TitleTextId, uint64 npcGUID )
|
||||
Quest const* pQuest = objmgr.GetQuestTemplate(questID);
|
||||
|
||||
data << uint32(questID);
|
||||
data << uint32( qItem.m_qIcon );
|
||||
data << uint32(qItem.m_qIcon);
|
||||
data << uint32(pSession->GetPlayer()->GetQuestLevel(pQuest));
|
||||
std::string Title = pQuest->GetTitle();
|
||||
|
||||
|
||||
+11
-10
@@ -276,7 +276,7 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recv_data)
|
||||
SendPartyResult(PARTY_OP_LEAVE, "", PARTY_RESULT_NOT_IN_YOUR_PARTY);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupUninviteNameOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,1);
|
||||
|
||||
@@ -290,7 +290,7 @@ void WorldSession::HandleGroupUninviteNameOpcode(WorldPacket & recv_data)
|
||||
// can't uninvite yourself
|
||||
if(GetPlayer()->GetName() == membername)
|
||||
{
|
||||
sLog.outError("WorldSession::HandleGroupUninviteNameOpcode: leader %s(%d) tried to uninvite himself from the group.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
|
||||
sLog.outError("WorldSession::HandleGroupUninviteOpcode: leader %s(%d) tried to uninvite himself from the group.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ void WorldSession::HandleGroupSetLeaderOpcode( WorldPacket & recv_data )
|
||||
group->ChangeLeader(guid);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupLeaveOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleGroupDisbandOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
if(!GetPlayer()->GetGroup())
|
||||
return;
|
||||
@@ -464,7 +464,7 @@ void WorldSession::HandleRandomRollOpcode(WorldPacket& recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleRaidIconTargetOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleRaidTargetUpdateOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,1);
|
||||
|
||||
@@ -497,7 +497,7 @@ void WorldSession::HandleRaidIconTargetOpcode( WorldPacket & recv_data )
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleRaidConvertOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleGroupRaidConvertOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
Group *group = GetPlayer()->GetGroup();
|
||||
if(!group)
|
||||
@@ -558,7 +558,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode( WorldPacket & recv_data )
|
||||
group->ChangeMembersGroup(movedPlayer, groupNr);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupAssistantOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleGroupAssistantLeaderOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8+1);
|
||||
|
||||
@@ -580,9 +580,10 @@ void WorldSession::HandleGroupAssistantOpcode( WorldPacket & recv_data )
|
||||
group->SetAssistant(guid, (flag==0?false:true));
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupPromoteOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandlePartyAssignmentOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 1+1+8);
|
||||
sLog.outDebug("MSG_PARTY_ASSIGNMENT");
|
||||
|
||||
Group *group = GetPlayer()->GetGroup();
|
||||
if(!group)
|
||||
@@ -642,7 +643,7 @@ void WorldSession::HandleRaidReadyCheckOpcode( WorldPacket & recv_data )
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleRaidReadyCheckFinishOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleRaidReadyCheckFinishedOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
//Group* group = GetPlayer()->GetGroup();
|
||||
//if(!group)
|
||||
@@ -919,11 +920,11 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data )
|
||||
sLog.outDebug( "WORLD: got CMSG_GROUP_CANCEL." );
|
||||
}*/
|
||||
|
||||
void WorldSession::HandleGroupPassOnLootOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleOptOutOfLootOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4);
|
||||
|
||||
sLog.outDebug("WORLD: Received CMSG_GROUP_PASS_ON_LOOT");
|
||||
sLog.outDebug("WORLD: Received CMSG_OPT_OUT_OF_LOOT");
|
||||
|
||||
uint32 unkn;
|
||||
recv_data >> unkn;
|
||||
|
||||
+15
-15
@@ -740,7 +740,7 @@ void WorldSession::SendGuildCommandResult(uint32 typecmd, const std::string& str
|
||||
//sLog.outDebug("WORLD: Sent (SMSG_GUILD_COMMAND_RESULT)");
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildChangeInfoOpcode(WorldPacket& recvPacket)
|
||||
void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recvPacket, 1);
|
||||
|
||||
@@ -766,7 +766,7 @@ void WorldSession::HandleGuildChangeInfoOpcode(WorldPacket& recvPacket)
|
||||
guild->SetGINFO(GINFO);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildSaveEmblemOpcode(WorldPacket& recvPacket)
|
||||
void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recvPacket, 8+4+4+4+4+4);
|
||||
|
||||
@@ -787,7 +787,7 @@ void WorldSession::HandleGuildSaveEmblemOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
//"That's not an emblem vendor!"
|
||||
SendSaveGuildEmblem(ERR_GUILDEMBLEM_INVALIDVENDOR);
|
||||
sLog.outDebug("WORLD: HandleGuildSaveEmblemOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(vendorGuid));
|
||||
sLog.outDebug("WORLD: HandleSaveGuildEmblemOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(vendorGuid));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -832,7 +832,7 @@ void WorldSession::HandleGuildSaveEmblemOpcode(WorldPacket& recvPacket)
|
||||
guild->Query(this);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildEventLogOpcode(WorldPacket& /* recvPacket */)
|
||||
void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
|
||||
{
|
||||
// empty
|
||||
sLog.outDebug("WORLD: Received (MSG_GUILD_EVENT_LOG_QUERY)");
|
||||
@@ -851,7 +851,7 @@ void WorldSession::HandleGuildEventLogOpcode(WorldPacket& /* recvPacket */)
|
||||
|
||||
/****** GUILD BANK *******/
|
||||
|
||||
void WorldSession::HandleGuildBankGetMoneyAmount( WorldPacket & /* recv_data */ )
|
||||
void WorldSession::HandleGuildBankMoneyWithdrawn( WorldPacket & /* recv_data */ )
|
||||
{
|
||||
sLog.outDebug("WORLD: Received (MSG_GUILD_BANK_MONEY_WITHDRAWN)");
|
||||
//recv_data.hexlike();
|
||||
@@ -867,7 +867,7 @@ void WorldSession::HandleGuildBankGetMoneyAmount( WorldPacket & /* recv_data */
|
||||
pGuild->SendMoneyInfo(this, GetPlayer()->GetGUIDLow());
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankGetRights( WorldPacket& /* recv_data */ )
|
||||
void WorldSession::HandleGuildPermissions( WorldPacket& /* recv_data */ )
|
||||
{
|
||||
sLog.outDebug("WORLD: Received (MSG_GUILD_PERMISSIONS)");
|
||||
|
||||
@@ -897,7 +897,7 @@ void WorldSession::HandleGuildBankGetRights( WorldPacket& /* recv_data */ )
|
||||
}
|
||||
|
||||
/* Called when clicking on Guild bank gameobject */
|
||||
void WorldSession::HandleGuildBankQuery( WorldPacket & recv_data )
|
||||
void WorldSession::HandleGuildBankerActivate( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANKER_ACTIVATE)");
|
||||
CHECK_PACKET_SIZE(recv_data,8+1);
|
||||
@@ -921,7 +921,7 @@ void WorldSession::HandleGuildBankQuery( WorldPacket & recv_data )
|
||||
}
|
||||
|
||||
/* Called when opening guild bank tab only (first one) */
|
||||
void WorldSession::HandleGuildBankTabColon( WorldPacket & recv_data )
|
||||
void WorldSession::HandleGuildBankQueryTab( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_QUERY_TAB)");
|
||||
CHECK_PACKET_SIZE(recv_data,8+1+1);
|
||||
@@ -947,7 +947,7 @@ void WorldSession::HandleGuildBankTabColon( WorldPacket & recv_data )
|
||||
pGuild->DisplayGuildBankContent(this, TabId);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankDeposit( WorldPacket & recv_data )
|
||||
void WorldSession::HandleGuildBankDepositMoney( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_DEPOSIT_MONEY)");
|
||||
CHECK_PACKET_SIZE(recv_data,8+4);
|
||||
@@ -995,7 +995,7 @@ void WorldSession::HandleGuildBankDeposit( WorldPacket & recv_data )
|
||||
pGuild->DisplayGuildBankMoneyUpdate();
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankWithdraw( WorldPacket & recv_data )
|
||||
void WorldSession::HandleGuildBankWithdrawMoney( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_WITHDRAW_MONEY)");
|
||||
CHECK_PACKET_SIZE(recv_data,8+4);
|
||||
@@ -1045,7 +1045,7 @@ void WorldSession::HandleGuildBankWithdraw( WorldPacket & recv_data )
|
||||
pGuild->DisplayGuildBankMoneyUpdate();
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankDepositItem( WorldPacket & recv_data )
|
||||
void WorldSession::HandleGuildBankSwapItems( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_SWAP_ITEMS)");
|
||||
//recv_data.hexlike();
|
||||
@@ -1599,7 +1599,7 @@ void WorldSession::HandleGuildBankBuyTab( WorldPacket & recv_data )
|
||||
pGuild->DisplayGuildBankTabsInfo(this);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankModifyTab( WorldPacket & recv_data )
|
||||
void WorldSession::HandleGuildBankUpdateTab( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_UPDATE_TAB)");
|
||||
//recv_data.hexlike();
|
||||
@@ -1636,7 +1636,7 @@ void WorldSession::HandleGuildBankModifyTab( WorldPacket & recv_data )
|
||||
pGuild->DisplayGuildBankContent(this, TabId);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankLog( WorldPacket & recv_data )
|
||||
void WorldSession::HandleGuildBankLogQuery( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug("WORLD: Received (MSG_GUILD_BANK_LOG_QUERY)");
|
||||
CHECK_PACKET_SIZE(recv_data, 1);
|
||||
@@ -1655,7 +1655,7 @@ void WorldSession::HandleGuildBankLog( WorldPacket & recv_data )
|
||||
pGuild->DisplayGuildBankLogs(this, TabId);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankTabText(WorldPacket &recv_data)
|
||||
void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: Received MSG_QUERY_GUILD_BANK_TEXT");
|
||||
CHECK_PACKET_SIZE(recv_data, 1);
|
||||
@@ -1674,7 +1674,7 @@ void WorldSession::HandleGuildBankTabText(WorldPacket &recv_data)
|
||||
pGuild->SendGuildBankTabText(this, TabId);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankSetTabText(WorldPacket &recv_data)
|
||||
void WorldSession::HandleSetGuildBankTabText(WorldPacket &recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: Received CMSG_SET_GUILD_BANK_TEXT");
|
||||
CHECK_PACKET_SIZE(recv_data, 1+1);
|
||||
|
||||
@@ -1009,7 +1009,7 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
else
|
||||
sLog.outDebug("WORLD: CMSG_ITEM_NAME_QUERY for item %u failed (unknown item)", itemid);
|
||||
sLog.outErrorDb("WORLD: CMSG_ITEM_NAME_QUERY for item %u failed (unknown item)", itemid);
|
||||
}
|
||||
|
||||
void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
|
||||
@@ -1321,7 +1321,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
|
||||
_player->ToggleMetaGemsActive(slot, true); //turn on all metagems (except for target item)
|
||||
}
|
||||
|
||||
void WorldSession::HandleCancelTempItemEnchantmentOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data)
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ enum ITEM_FLAGS
|
||||
|
||||
enum BAG_FAMILY_MASK
|
||||
{
|
||||
BAG_FAMILY_MASK_NONE = 0x00000000,
|
||||
BAG_FAMILY_MASK_ARROWS = 0x00000001,
|
||||
BAG_FAMILY_MASK_BULLETS = 0x00000002,
|
||||
BAG_FAMILY_MASK_SOUL_SHARDS = 0x00000004,
|
||||
@@ -564,7 +565,7 @@ struct ItemPrototype
|
||||
uint32 MaxDurability;
|
||||
uint32 Area; // id from AreaTable.dbc
|
||||
uint32 Map; // id from Map.dbc
|
||||
uint32 BagFamily; // bit string (1 << id from ItemBagFamily.dbc)
|
||||
uint32 BagFamily; // bit mask (1 << id from ItemBagFamily.dbc)
|
||||
uint32 TotemCategory; // id from TotemCategory.dbc
|
||||
_Socket Socket[MAX_ITEM_PROTO_SOCKETS];
|
||||
uint32 socketBonus; // id from SpellItemEnchantment.dbc
|
||||
|
||||
+18
-16
@@ -142,9 +142,9 @@ static void AttemptAddMore(Player* _player)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgAutoJoinOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleLfgSetAutoJoinOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
sLog.outDebug("CMSG_SET_LFG_AUTO_JOIN");
|
||||
sLog.outDebug("CMSG_LFG_SET_AUTOJOIN");
|
||||
LookingForGroup_auto_join = true;
|
||||
|
||||
if(!_player) // needed because STATUS_AUTHED
|
||||
@@ -153,15 +153,15 @@ void WorldSession::HandleLfgAutoJoinOpcode( WorldPacket & /*recv_data*/ )
|
||||
AttemptJoin(_player);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgCancelAutoJoinOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleLfgClearAutoJoinOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
sLog.outDebug("CMSG_UNSET_LFG_AUTO_JOIN");
|
||||
sLog.outDebug("CMSG_LFG_CLEAR_AUTOJOIN");
|
||||
LookingForGroup_auto_join = false;
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfmAutoAddMembersOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleLfmSetAutoFillOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
sLog.outDebug("CMSG_SET_LFM_AUTOADD");
|
||||
sLog.outDebug("CMSG_LFM_SET_AUTOFILL");
|
||||
LookingForGroup_auto_add = true;
|
||||
|
||||
if(!_player) // needed because STATUS_AUTHED
|
||||
@@ -170,15 +170,16 @@ void WorldSession::HandleLfmAutoAddMembersOpcode( WorldPacket & /*recv_data*/ )
|
||||
AttemptAddMore(_player);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfmCancelAutoAddmembersOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleLfmClearAutoFillOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
sLog.outDebug("CMSG_UNSET_LFM_AUTOADD");
|
||||
sLog.outDebug("CMSG_LFM_CLEAR_AUTOFILL");
|
||||
LookingForGroup_auto_add = false;
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgClearOpcode( WorldPacket & /*recv_data */ )
|
||||
{
|
||||
sLog.outDebug("CMSG_LOOKING_FOR_GROUP_CLEAR");
|
||||
// empty packet
|
||||
sLog.outDebug("CMSG_CLEAR_LOOKING_FOR_GROUP");
|
||||
|
||||
for(int i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
|
||||
_player->m_lookingForGroup.slots[i].Clear();
|
||||
@@ -187,14 +188,15 @@ void WorldSession::HandleLfgClearOpcode( WorldPacket & /*recv_data */ )
|
||||
_player->LeaveLFGChannel();
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfmSetNoneOpcode( WorldPacket & /*recv_data */)
|
||||
void WorldSession::HandleLfmClearOpcode( WorldPacket & /*recv_data */)
|
||||
{
|
||||
sLog.outDebug("CMSG_SET_LOOKING_FOR_NONE");
|
||||
// empty packet
|
||||
sLog.outDebug("CMSG_CLEAR_LOOKING_FOR_MORE");
|
||||
|
||||
_player->m_lookingForGroup.more.Clear();
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfmSetOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleSetLfmOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,4);
|
||||
|
||||
@@ -216,11 +218,11 @@ void WorldSession::HandleLfmSetOpcode( WorldPacket & recv_data )
|
||||
SendLfgResult(type, entry, 1);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgSetCommentOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleSetLfgCommentOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,1);
|
||||
CHECK_PACKET_SIZE(recv_data, 1);
|
||||
|
||||
sLog.outDebug("CMSG_SET_COMMENTARY");
|
||||
sLog.outDebug("CMSG_SET_LFG_COMMENT");
|
||||
//recv_data.hexlike();
|
||||
|
||||
std::string comment;
|
||||
@@ -232,7 +234,7 @@ void WorldSession::HandleLfgSetCommentOpcode( WorldPacket & recv_data )
|
||||
|
||||
void WorldSession::HandleLookingForGroup(WorldPacket& recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,4+4+4);
|
||||
CHECK_PACKET_SIZE(recv_data, 4+4+4);
|
||||
|
||||
sLog.outDebug("MSG_LOOKING_FOR_GROUP");
|
||||
//recv_data.hexlike();
|
||||
|
||||
+1
-1
@@ -1068,7 +1068,7 @@ bool ChatHandler::HandleModifyKnownTitlesCommand(const char* args)
|
||||
|
||||
uint64 titles2 = titles;
|
||||
|
||||
for(int i=1; i < sCharTitlesStore.GetNumRows(); ++i)
|
||||
for(int i = 1; i < sCharTitlesStore.GetNumRows(); ++i)
|
||||
if(CharTitlesEntry const* tEntry = sCharTitlesStore.LookupEntry(i))
|
||||
titles2 &= ~(uint64(1) << tEntry->bit_index);
|
||||
|
||||
|
||||
+6
-6
@@ -289,7 +289,7 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data )
|
||||
}
|
||||
|
||||
//called when mail is read
|
||||
void WorldSession::HandleMarkAsRead(WorldPacket & recv_data )
|
||||
void WorldSession::HandleMailMarkAsRead(WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8+4);
|
||||
|
||||
@@ -335,7 +335,7 @@ void WorldSession::HandleMailDelete(WorldPacket & recv_data )
|
||||
pl->SendMailResult(mailId, MAIL_DELETED, MAIL_OK);
|
||||
}
|
||||
|
||||
void WorldSession::HandleReturnToSender(WorldPacket & recv_data )
|
||||
void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8+4);
|
||||
|
||||
@@ -442,7 +442,7 @@ void WorldSession::SendReturnToSender(uint8 messageType, uint32 sender_acc, uint
|
||||
}
|
||||
|
||||
//called when player takes item attached in mail
|
||||
void WorldSession::HandleTakeItem(WorldPacket & recv_data )
|
||||
void WorldSession::HandleMailTakeItem(WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8+4+4);
|
||||
|
||||
@@ -537,7 +537,7 @@ void WorldSession::HandleTakeItem(WorldPacket & recv_data )
|
||||
pl->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_ERR_EQUIP_ERROR, msg);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTakeMoney(WorldPacket & recv_data )
|
||||
void WorldSession::HandleMailTakeMoney(WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8+4);
|
||||
|
||||
@@ -573,7 +573,7 @@ void WorldSession::HandleTakeMoney(WorldPacket & recv_data )
|
||||
}
|
||||
|
||||
//called when player lists his received mails
|
||||
void WorldSession::HandleGetMail(WorldPacket & recv_data )
|
||||
void WorldSession::HandleGetMailList(WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8);
|
||||
|
||||
@@ -761,7 +761,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data )
|
||||
}
|
||||
|
||||
//TODO Fix me! ... this void has probably bad condition, but good data are sent
|
||||
void WorldSession::HandleMsgQueryNextMailtime(WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleQueryNextMailTime(WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
WorldPacket data(MSG_QUERY_NEXT_MAIL_TIME, 8);
|
||||
|
||||
|
||||
+2
-9
@@ -2020,12 +2020,9 @@ void Map::SendInitSelf( Player * player )
|
||||
|
||||
UpdateData data;
|
||||
|
||||
bool hasTransport = false;
|
||||
|
||||
// attach to player data current transport data
|
||||
if(Transport* transport = player->GetTransport())
|
||||
{
|
||||
hasTransport = true;
|
||||
transport->BuildCreateUpdateBlockForPlayer(&data, player);
|
||||
}
|
||||
|
||||
@@ -2039,14 +2036,13 @@ void Map::SendInitSelf( Player * player )
|
||||
{
|
||||
if(player!=(*itr) && player->HaveAtClient(*itr))
|
||||
{
|
||||
hasTransport = true;
|
||||
(*itr)->BuildCreateUpdateBlockForPlayer(&data, player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket packet;
|
||||
data.BuildPacket(&packet, hasTransport);
|
||||
data.BuildPacket(&packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
}
|
||||
|
||||
@@ -2063,20 +2059,17 @@ void Map::SendInitTransports( Player * player )
|
||||
|
||||
MapManager::TransportSet& tset = tmap[player->GetMapId()];
|
||||
|
||||
bool hasTransport = false;
|
||||
|
||||
for (MapManager::TransportSet::const_iterator i = tset.begin(); i != tset.end(); ++i)
|
||||
{
|
||||
// send data for current transport in other place
|
||||
if((*i) != player->GetTransport() && (*i)->GetMapId()==i_id)
|
||||
{
|
||||
hasTransport = true;
|
||||
(*i)->BuildCreateUpdateBlockForPlayer(&transData, player);
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket packet;
|
||||
transData.BuildPacket(&packet, hasTransport);
|
||||
transData.BuildPacket(&packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
}
|
||||
|
||||
|
||||
+17
-26
@@ -526,7 +526,7 @@ void WorldSession::HandleStandStateChangeOpcode( WorldPacket & recv_data )
|
||||
_player->SetStandState(animstate);
|
||||
}
|
||||
|
||||
void WorldSession::HandleFriendListOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleContactListOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4);
|
||||
sLog.outDebug( "WORLD: Received CMSG_CONTACT_LIST" );
|
||||
@@ -715,9 +715,10 @@ void WorldSession::HandleDelIgnoreOpcode( WorldPacket & recv_data )
|
||||
sLog.outDebug( "WORLD: Sent motd (SMSG_FRIEND_STATUS)" );
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetFriendNoteOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleSetContactNotesOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8+1);
|
||||
sLog.outDebug("CMSG_SET_CONTACT_NOTES");
|
||||
uint64 guid;
|
||||
std::string note;
|
||||
recv_data >> guid >> note;
|
||||
@@ -753,7 +754,7 @@ void WorldSession::HandleBugOpcode( WorldPacket & recv_data )
|
||||
CharacterDatabase.PExecute ("INSERT INTO bugreport (type,content) VALUES('%s', '%s')", type.c_str( ), content.c_str( ));
|
||||
}
|
||||
|
||||
void WorldSession::HandleCorpseReclaimOpcode(WorldPacket &recv_data)
|
||||
void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8);
|
||||
|
||||
@@ -1071,7 +1072,7 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleCompleteCinema( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleCompleteCinematic( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
DEBUG_LOG( "WORLD: Player is watching cinema" );
|
||||
}
|
||||
@@ -1175,7 +1176,7 @@ void WorldSession::HandleMoveRootAck(WorldPacket&/* recv_data*/)
|
||||
*/
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetActionBar(WorldPacket& recv_data)
|
||||
void WorldSession::HandleSetActionBarToggles(WorldPacket& recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,1);
|
||||
|
||||
@@ -1186,7 +1187,7 @@ void WorldSession::HandleSetActionBar(WorldPacket& recv_data)
|
||||
if(!GetPlayer()) // ignore until not logged (check needed because STATUS_AUTHED)
|
||||
{
|
||||
if(ActionBar!=0)
|
||||
sLog.outError("WorldSession::HandleSetActionBar in not logged state with value: %u, ignored",uint32(ActionBar));
|
||||
sLog.outError("WorldSession::HandleSetActionBarToggles in not logged state with value: %u, ignored",uint32(ActionBar));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1426,10 +1427,10 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
|
||||
sLog.outDebug("Received whois command from player %s for character %s", GetPlayer()->GetName(), charname.c_str());
|
||||
}
|
||||
|
||||
void WorldSession::HandleReportSpamOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleComplainOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 1+8);
|
||||
sLog.outDebug("WORLD: CMSG_REPORT_SPAM");
|
||||
sLog.outDebug("WORLD: CMSG_COMPLAIN");
|
||||
recv_data.hexlike();
|
||||
|
||||
uint8 spam_type; // 0 - mail, 1 - chat
|
||||
@@ -1470,7 +1471,7 @@ void WorldSession::HandleReportSpamOpcode( WorldPacket & recv_data )
|
||||
sLog.outDebug("REPORT SPAM: type %u, guid %u, unk1 %u, unk2 %u, unk3 %u, unk4 %u, message %s", spam_type, GUID_LOPART(spammer_guid), unk1, unk2, unk3, unk4, description.c_str());
|
||||
}
|
||||
|
||||
void WorldSession::HandleRealmStateRequestOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleRealmSplitOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4);
|
||||
|
||||
@@ -1525,7 +1526,7 @@ void WorldSession::HandleFarSightOpcode( WorldPacket & recv_data )
|
||||
GetPlayer()->SetToNotify();
|
||||
}
|
||||
|
||||
void WorldSession::HandleChooseTitleOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleSetTitleOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4);
|
||||
|
||||
@@ -1574,7 +1575,7 @@ void WorldSession::HandleResetInstancesOpcode( WorldPacket & /*recv_data*/ )
|
||||
_player->ResetInstances(INSTANCE_RESET_ALL);
|
||||
}
|
||||
|
||||
void WorldSession::HandleDungeonDifficultyOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleSetDungeonDifficultyOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4);
|
||||
|
||||
@@ -1588,7 +1589,7 @@ void WorldSession::HandleDungeonDifficultyOpcode( WorldPacket & recv_data )
|
||||
|
||||
if(mode > DIFFICULTY_HEROIC)
|
||||
{
|
||||
sLog.outError("WorldSession::HandleDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
|
||||
sLog.outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1596,7 +1597,7 @@ void WorldSession::HandleDungeonDifficultyOpcode( WorldPacket & recv_data )
|
||||
Map *map = _player->GetMap();
|
||||
if(map && map->IsDungeon())
|
||||
{
|
||||
sLog.outError("WorldSession::HandleDungeonDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
|
||||
sLog.outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1620,7 +1621,7 @@ void WorldSession::HandleDungeonDifficultyOpcode( WorldPacket & recv_data )
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleDismountOpcode( WorldPacket & /*recv_data*/ )
|
||||
void WorldSession::HandleCancelMountAuraOpcode( WorldPacket & /*recv_data*/ )
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CANCEL_MOUNT_AURA");
|
||||
//recv_data.hexlike();
|
||||
@@ -1642,7 +1643,7 @@ void WorldSession::HandleDismountOpcode( WorldPacket & /*recv_data*/ )
|
||||
_player->RemoveAurasByType(SPELL_AURA_MOUNTED);
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveFlyModeChangeAckOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleMoveSetCanFlyAckOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 8+4+4);
|
||||
|
||||
@@ -1657,16 +1658,6 @@ void WorldSession::HandleMoveFlyModeChangeAckOpcode( WorldPacket & recv_data )
|
||||
recv_data >> guid >> unk >> flags;
|
||||
|
||||
_player->SetUnitMovementFlags(flags);
|
||||
/*
|
||||
on:
|
||||
25 00 00 00 00 00 00 00 | 00 00 00 00 00 00 80 00
|
||||
85 4E A9 01 19 BA 7A C3 | 42 0D 70 44 44 B0 A8 42
|
||||
78 15 94 40 39 03 00 00 | 00 00 80 3F
|
||||
off:
|
||||
25 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00
|
||||
10 FD A9 01 19 BA 7A C3 | 42 0D 70 44 44 B0 A8 42
|
||||
78 15 94 40 39 03 00 00 | 00 00 00 00
|
||||
*/
|
||||
}
|
||||
|
||||
void WorldSession::HandleRequestPetInfoOpcode( WorldPacket & /*recv_data */)
|
||||
@@ -1687,7 +1678,7 @@ void WorldSession::HandleSetTaxiBenchmarkOpcode( WorldPacket & recv_data )
|
||||
sLog.outDebug("Client used \"/timetest %d\" command", mode);
|
||||
}
|
||||
|
||||
void WorldSession::HandleInspectAchievements( WorldPacket & recv_data )
|
||||
void WorldSession::HandleQueryInspectAchievements( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 1);
|
||||
uint64 guid;
|
||||
|
||||
+26
-33
@@ -62,7 +62,7 @@ uint32 GuidHigh2TypeId(uint32 guid_hi)
|
||||
case HIGHGUID_MO_TRANSPORT: return TYPEID_GAMEOBJECT;
|
||||
case HIGHGUID_VEHICLE: return TYPEID_UNIT;
|
||||
}
|
||||
return MAX_TYPEID; // unknown
|
||||
return NUM_CLIENT_OBJECT_TYPES; // unknown
|
||||
}
|
||||
|
||||
Object::Object( )
|
||||
@@ -120,7 +120,7 @@ void Object::_Create( uint32 guidlow, uint32 entry, HighGuid guidhigh )
|
||||
{
|
||||
if(!m_uint32Values) _InitValues();
|
||||
|
||||
uint64 guid = MAKE_NEW_GUID(guidlow, entry, guidhigh); // required more changes to make it working
|
||||
uint64 guid = MAKE_NEW_GUID(guidlow, entry, guidhigh);
|
||||
SetUInt64Value( OBJECT_FIELD_GUID, guid );
|
||||
SetUInt32Value( OBJECT_FIELD_TYPE, m_objectType );
|
||||
m_PackGUID.clear();
|
||||
@@ -129,10 +129,10 @@ void Object::_Create( uint32 guidlow, uint32 entry, HighGuid guidhigh )
|
||||
|
||||
void Object::BuildMovementUpdateBlock(UpdateData * data, uint32 flags ) const
|
||||
{
|
||||
ByteBuffer buf(500);
|
||||
ByteBuffer buf(50);
|
||||
|
||||
buf << uint8( UPDATETYPE_MOVEMENT );
|
||||
buf << GetGUID();
|
||||
buf.append(GetPackGUID());
|
||||
|
||||
_BuildMovementUpdate(&buf, flags);
|
||||
|
||||
@@ -142,15 +142,13 @@ void Object::BuildMovementUpdateBlock(UpdateData * data, uint32 flags ) const
|
||||
void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const
|
||||
{
|
||||
if(!target)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
uint8 updatetype = UPDATETYPE_CREATE_OBJECT;
|
||||
uint8 flags = m_updateFlag;
|
||||
|
||||
/** lower flag1 **/
|
||||
if(target == this) // building packet for oneself
|
||||
if(target == this) // building packet for yourself
|
||||
flags |= UPDATEFLAG_SELF;
|
||||
|
||||
if(flags & UPDATEFLAG_HAS_POSITION)
|
||||
@@ -191,10 +189,9 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) c
|
||||
|
||||
//sLog.outDebug("BuildCreateUpdate: update-type: %u, object-type: %u got flags: %X, flags2: %X", updatetype, m_objectTypeId, flags, flags2);
|
||||
|
||||
ByteBuffer buf(500);
|
||||
ByteBuffer buf(50);
|
||||
buf << (uint8)updatetype;
|
||||
//buf.append(GetPackGUID()); //client crashes when using this
|
||||
buf << (uint8)0xFF << GetGUID();
|
||||
buf.append(GetPackGUID());
|
||||
buf << (uint8)m_objectTypeId;
|
||||
|
||||
_BuildMovementUpdate(&buf, flags);
|
||||
@@ -202,7 +199,7 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) c
|
||||
UpdateMask updateMask;
|
||||
updateMask.SetCount( m_valuesCount );
|
||||
_SetCreateBits( &updateMask, target );
|
||||
_BuildValuesUpdate(updatetype, &buf, &updateMask, target );
|
||||
_BuildValuesUpdate(updatetype, &buf, &updateMask, target);
|
||||
data->AddUpdateBlock(buf);
|
||||
}
|
||||
|
||||
@@ -224,24 +221,20 @@ void Object::SendUpdateToPlayer(Player* player)
|
||||
BuildCreateUpdateBlockForPlayer(&upd, player);
|
||||
upd.BuildPacket(&packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
|
||||
// now object updated/(create updated)
|
||||
}
|
||||
|
||||
void Object::BuildValuesUpdateBlockForPlayer(UpdateData *data, Player *target) const
|
||||
{
|
||||
ByteBuffer buf(500);
|
||||
ByteBuffer buf(50);
|
||||
|
||||
buf << (uint8) UPDATETYPE_VALUES;
|
||||
//buf.append(GetPackGUID()); //client crashes when using this. but not have crash in debug mode
|
||||
buf << (uint8)0xFF;
|
||||
buf << GetGUID();
|
||||
buf.append(GetPackGUID());
|
||||
|
||||
UpdateMask updateMask;
|
||||
updateMask.SetCount( m_valuesCount );
|
||||
|
||||
_SetUpdateBits( &updateMask, target );
|
||||
_BuildValuesUpdate(UPDATETYPE_VALUES, &buf, &updateMask, target );
|
||||
_BuildValuesUpdate(UPDATETYPE_VALUES, &buf, &updateMask, target);
|
||||
|
||||
data->AddUpdateBlock(buf);
|
||||
}
|
||||
@@ -256,7 +249,7 @@ void Object::DestroyForPlayer(Player *target) const
|
||||
ASSERT(target);
|
||||
|
||||
WorldPacket data(SMSG_DESTROY_OBJECT, 8);
|
||||
data << GetGUID();
|
||||
data << uint64(GetGUID());
|
||||
data << uint8(0); // WotLK (bool)
|
||||
target->GetSession()->SendPacket( &data );
|
||||
}
|
||||
@@ -502,7 +495,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
||||
updateMask->SetBit(GAMEOBJECT_BYTES_1);
|
||||
}
|
||||
}
|
||||
else //case UPDATETYPE_VALUES
|
||||
else // case UPDATETYPE_VALUES
|
||||
{
|
||||
if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsTransport())
|
||||
{
|
||||
@@ -659,7 +652,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
||||
*data << uint32(1);
|
||||
break;
|
||||
default:
|
||||
*data << uint32(0); // unknown. not happen.
|
||||
*data << uint32(0); // unknown, not happen.
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -946,21 +939,21 @@ void Object::ApplyModUInt32Value(uint16 index, int32 val, bool apply)
|
||||
cur += (apply ? val : -val);
|
||||
if(cur < 0)
|
||||
cur = 0;
|
||||
SetUInt32Value(index,cur);
|
||||
SetUInt32Value(index, cur);
|
||||
}
|
||||
|
||||
void Object::ApplyModInt32Value(uint16 index, int32 val, bool apply)
|
||||
{
|
||||
int32 cur = GetInt32Value(index);
|
||||
cur += (apply ? val : -val);
|
||||
SetInt32Value(index,cur);
|
||||
SetInt32Value(index, cur);
|
||||
}
|
||||
|
||||
void Object::ApplyModSignedFloatValue(uint16 index, float val, bool apply)
|
||||
{
|
||||
float cur = GetFloatValue(index);
|
||||
cur += (apply ? val : -val);
|
||||
SetFloatValue(index,cur);
|
||||
SetFloatValue(index, cur);
|
||||
}
|
||||
|
||||
void Object::ApplyModPositiveFloatValue(uint16 index, float val, bool apply)
|
||||
@@ -969,7 +962,7 @@ void Object::ApplyModPositiveFloatValue(uint16 index, float val, bool apply)
|
||||
cur += (apply ? val : -val);
|
||||
if(cur < 0)
|
||||
cur = 0;
|
||||
SetFloatValue(index,cur);
|
||||
SetFloatValue(index, cur);
|
||||
}
|
||||
|
||||
void Object::SetFlag( uint16 index, uint32 newFlag )
|
||||
@@ -1133,17 +1126,17 @@ void WorldObject::_Create( uint32 guidlow, HighGuid guidhigh, uint32 mapid, uint
|
||||
|
||||
uint32 WorldObject::GetZoneId() const
|
||||
{
|
||||
return MapManager::Instance().GetBaseMap(m_mapId)->GetZoneId(m_positionX,m_positionY,m_positionZ);
|
||||
return MapManager::Instance().GetBaseMap(m_mapId)->GetZoneId(m_positionX, m_positionY, m_positionZ);
|
||||
}
|
||||
|
||||
uint32 WorldObject::GetAreaId() const
|
||||
{
|
||||
return MapManager::Instance().GetBaseMap(m_mapId)->GetAreaId(m_positionX,m_positionY,m_positionZ);
|
||||
return MapManager::Instance().GetBaseMap(m_mapId)->GetAreaId(m_positionX, m_positionY, m_positionZ);
|
||||
}
|
||||
|
||||
void WorldObject::GetZoneAndAreaId(uint32& zoneid, uint32& areaid) const
|
||||
{
|
||||
MapManager::Instance().GetBaseMap(m_mapId)->GetZoneAndAreaId(zoneid,areaid,m_positionX,m_positionY,m_positionZ);
|
||||
MapManager::Instance().GetBaseMap(m_mapId)->GetZoneAndAreaId(zoneid, areaid, m_positionX, m_positionY, m_positionZ);
|
||||
}
|
||||
|
||||
InstanceData* WorldObject::GetInstanceData()
|
||||
@@ -1653,10 +1646,10 @@ void WorldObject::BuildMonsterChat(WorldPacket *data, uint8 msgtype, char const*
|
||||
*data << (uint8)msgtype;
|
||||
*data << (uint32)language;
|
||||
*data << (uint64)GetGUID();
|
||||
*data << (uint32)0; //2.1.0
|
||||
*data << (uint32)0; // 2.1.0
|
||||
*data << (uint32)(strlen(name)+1);
|
||||
*data << name;
|
||||
*data << (uint64)targetGuid; //Unit Target
|
||||
*data << (uint64)targetGuid; // Unit Target
|
||||
if( targetGuid && !IS_PLAYER_GUID(targetGuid) )
|
||||
{
|
||||
*data << (uint32)1; // target name length
|
||||
@@ -1679,7 +1672,7 @@ void WorldObject::BuildHeartBeatMsg(WorldPacket *data) const
|
||||
data->append(GetPackGUID());
|
||||
*data << uint32(((Unit*)this)->GetUnitMovementFlags()); // movement flags
|
||||
*data << uint16(0); // 2.3.0
|
||||
*data << getMSTime(); // time
|
||||
*data << uint32(getMSTime()); // time
|
||||
*data << m_positionX;
|
||||
*data << m_positionY;
|
||||
*data << m_positionZ;
|
||||
@@ -1699,7 +1692,7 @@ void WorldObject::BuildTeleportAckMsg(WorldPacket *data, float x, float y, float
|
||||
*data << uint32(0); // this value increments every time
|
||||
*data << uint32(((Unit*)this)->GetUnitMovementFlags()); // movement flags
|
||||
*data << uint16(0); // 2.3.0
|
||||
*data << getMSTime(); // time
|
||||
*data << uint32(getMSTime()); // time
|
||||
*data << x;
|
||||
*data << y;
|
||||
*data << z;
|
||||
@@ -2277,7 +2270,7 @@ void WorldObject::PlayDistanceSound( uint32 sound_id, Player* target /*= NULL*/
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_OBJECT_SOUND,4+8);
|
||||
data << uint32(sound_id);
|
||||
data << GetGUID();
|
||||
data << uint64(GetGUID());
|
||||
if (target)
|
||||
target->SendDirectMessage( &data );
|
||||
else
|
||||
|
||||
+3
-6
@@ -55,8 +55,6 @@ enum TypeMask
|
||||
TYPEMASK_GAMEOBJECT = 0x0020,
|
||||
TYPEMASK_DYNAMICOBJECT = 0x0040,
|
||||
TYPEMASK_CORPSE = 0x0080,
|
||||
TYPEMASK_AIGROUP = 0x0100,
|
||||
TYPEMASK_AREATRIGGER = 0x0200,
|
||||
TYPEMASK_SEER = TYPEMASK_UNIT | TYPEMASK_DYNAMICOBJECT
|
||||
};
|
||||
|
||||
@@ -69,11 +67,10 @@ enum TypeID
|
||||
TYPEID_PLAYER = 4,
|
||||
TYPEID_GAMEOBJECT = 5,
|
||||
TYPEID_DYNAMICOBJECT = 6,
|
||||
TYPEID_CORPSE = 7,
|
||||
TYPEID_AIGROUP = 8,
|
||||
TYPEID_AREATRIGGER = 9
|
||||
TYPEID_CORPSE = 7
|
||||
};
|
||||
#define MAX_TYPEID 10
|
||||
|
||||
#define NUM_CLIENT_OBJECT_TYPES 8
|
||||
|
||||
uint32 GuidHigh2TypeId(uint32 guid_hi);
|
||||
|
||||
|
||||
+89
-89
@@ -118,7 +118,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x057*/ { "CMSG_ITEM_QUERY_MULTIPLE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x058*/ { "SMSG_ITEM_QUERY_SINGLE_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x059*/ { "SMSG_ITEM_QUERY_MULTIPLE_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x05A*/ { "CMSG_PAGE_TEXT_QUERY", STATUS_LOGGEDIN, &WorldSession::HandlePageQueryOpcode },
|
||||
/*0x05A*/ { "CMSG_PAGE_TEXT_QUERY", STATUS_LOGGEDIN, &WorldSession::HandlePageTextQueryOpcode },
|
||||
/*0x05B*/ { "SMSG_PAGE_TEXT_QUERY_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x05C*/ { "CMSG_QUEST_QUERY", STATUS_LOGGEDIN, &WorldSession::HandleQuestQueryOpcode },
|
||||
/*0x05D*/ { "SMSG_QUEST_QUERY_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -130,28 +130,28 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x063*/ { "SMSG_WHO", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x064*/ { "CMSG_WHOIS", STATUS_LOGGEDIN, &WorldSession::HandleWhoisOpcode },
|
||||
/*0x065*/ { "SMSG_WHOIS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x066*/ { "CMSG_CONTACT_LIST", STATUS_LOGGEDIN, &WorldSession::HandleFriendListOpcode },
|
||||
/*0x066*/ { "CMSG_CONTACT_LIST", STATUS_LOGGEDIN, &WorldSession::HandleContactListOpcode },
|
||||
/*0x067*/ { "SMSG_CONTACT_LIST", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x068*/ { "SMSG_FRIEND_STATUS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x069*/ { "CMSG_ADD_FRIEND", STATUS_LOGGEDIN, &WorldSession::HandleAddFriendOpcode },
|
||||
/*0x06A*/ { "CMSG_DEL_FRIEND", STATUS_LOGGEDIN, &WorldSession::HandleDelFriendOpcode },
|
||||
/*0x06B*/ { "CMSG_SET_CONTACT_NOTES", STATUS_LOGGEDIN, &WorldSession::HandleSetFriendNoteOpcode },
|
||||
/*0x06B*/ { "CMSG_SET_CONTACT_NOTES", STATUS_LOGGEDIN, &WorldSession::HandleSetContactNotesOpcode },
|
||||
/*0x06C*/ { "CMSG_ADD_IGNORE", STATUS_LOGGEDIN, &WorldSession::HandleAddIgnoreOpcode },
|
||||
/*0x06D*/ { "CMSG_DEL_IGNORE", STATUS_LOGGEDIN, &WorldSession::HandleDelIgnoreOpcode },
|
||||
/*0x06E*/ { "CMSG_GROUP_INVITE", STATUS_LOGGEDIN, &WorldSession::HandleGroupInviteOpcode },
|
||||
/*0x06F*/ { "SMSG_GROUP_INVITE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x070*/ { "CMSG_GROUP_CANCEL", STATUS_LOGGEDIN, &WorldSession::Handle_Deprecated },
|
||||
/*0x070*/ { "CMSG_GROUP_CANCEL", STATUS_LOGGEDIN, &WorldSession::Handle_NULL },
|
||||
/*0x071*/ { "SMSG_GROUP_CANCEL", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x072*/ { "CMSG_GROUP_ACCEPT", STATUS_LOGGEDIN, &WorldSession::HandleGroupAcceptOpcode },
|
||||
/*0x073*/ { "CMSG_GROUP_DECLINE", STATUS_LOGGEDIN, &WorldSession::HandleGroupDeclineOpcode },
|
||||
/*0x074*/ { "SMSG_GROUP_DECLINE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x075*/ { "CMSG_GROUP_UNINVITE", STATUS_LOGGEDIN, &WorldSession::HandleGroupUninviteNameOpcode },
|
||||
/*0x075*/ { "CMSG_GROUP_UNINVITE", STATUS_LOGGEDIN, &WorldSession::HandleGroupUninviteOpcode },
|
||||
/*0x076*/ { "CMSG_GROUP_UNINVITE_GUID", STATUS_LOGGEDIN, &WorldSession::HandleGroupUninviteGuidOpcode },
|
||||
/*0x077*/ { "SMSG_GROUP_UNINVITE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x078*/ { "CMSG_GROUP_SET_LEADER", STATUS_LOGGEDIN, &WorldSession::HandleGroupSetLeaderOpcode },
|
||||
/*0x079*/ { "SMSG_GROUP_SET_LEADER", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x07A*/ { "CMSG_LOOT_METHOD", STATUS_LOGGEDIN, &WorldSession::HandleLootMethodOpcode },
|
||||
/*0x07B*/ { "CMSG_GROUP_DISBAND", STATUS_LOGGEDIN, &WorldSession::HandleGroupLeaveOpcode },
|
||||
/*0x07B*/ { "CMSG_GROUP_DISBAND", STATUS_LOGGEDIN, &WorldSession::HandleGroupDisbandOpcode },
|
||||
/*0x07C*/ { "SMSG_GROUP_DESTROYED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x07D*/ { "SMSG_GROUP_LIST", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x07E*/ { "SMSG_PARTY_MEMBER_STATS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -179,8 +179,8 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x094*/ { "UMSG_UPDATE_GUILD", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x095*/ { "CMSG_MESSAGECHAT", STATUS_LOGGEDIN, &WorldSession::HandleMessagechatOpcode },
|
||||
/*0x096*/ { "SMSG_MESSAGECHAT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x097*/ { "CMSG_JOIN_CHANNEL", STATUS_LOGGEDIN, &WorldSession::HandleChannelJoin },
|
||||
/*0x098*/ { "CMSG_LEAVE_CHANNEL", STATUS_LOGGEDIN, &WorldSession::HandleChannelLeave },
|
||||
/*0x097*/ { "CMSG_JOIN_CHANNEL", STATUS_LOGGEDIN, &WorldSession::HandleJoinChannel },
|
||||
/*0x098*/ { "CMSG_LEAVE_CHANNEL", STATUS_LOGGEDIN, &WorldSession::HandleLeaveChannel },
|
||||
/*0x099*/ { "SMSG_CHANNEL_NOTIFY", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x09A*/ { "CMSG_CHANNEL_LIST", STATUS_LOGGEDIN, &WorldSession::HandleChannelList },
|
||||
/*0x09B*/ { "SMSG_CHANNEL_LIST", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -195,7 +195,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x0A4*/ { "CMSG_CHANNEL_KICK", STATUS_LOGGEDIN, &WorldSession::HandleChannelKick },
|
||||
/*0x0A5*/ { "CMSG_CHANNEL_BAN", STATUS_LOGGEDIN, &WorldSession::HandleChannelBan },
|
||||
/*0x0A6*/ { "CMSG_CHANNEL_UNBAN", STATUS_LOGGEDIN, &WorldSession::HandleChannelUnban },
|
||||
/*0x0A7*/ { "CMSG_CHANNEL_ANNOUNCEMENTS", STATUS_LOGGEDIN, &WorldSession::HandleChannelAnnounce },
|
||||
/*0x0A7*/ { "CMSG_CHANNEL_ANNOUNCEMENTS", STATUS_LOGGEDIN, &WorldSession::HandleChannelAnnouncements },
|
||||
/*0x0A8*/ { "CMSG_CHANNEL_MODERATE", STATUS_LOGGEDIN, &WorldSession::HandleChannelModerate },
|
||||
/*0x0A9*/ { "SMSG_UPDATE_OBJECT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x0AA*/ { "SMSG_DESTROY_OBJECT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -248,7 +248,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x0D9*/ { "MSG_MOVE_TOGGLE_COLLISION_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x0DA*/ { "MSG_MOVE_SET_FACING", STATUS_LOGGEDIN, &WorldSession::HandleMovementOpcodes },
|
||||
/*0x0DB*/ { "MSG_MOVE_SET_PITCH", STATUS_LOGGEDIN, &WorldSession::HandleMovementOpcodes },
|
||||
/*0x0DC*/ { "MSG_MOVE_WORLDPORT_ACK", STATUS_TRANSFER_PENDING,&WorldSession::HandleMoveWorldportAckOpcode},
|
||||
/*0x0DC*/ { "MSG_MOVE_WORLDPORT_ACK", STATUS_TRANSFER, &WorldSession::HandleMoveWorldportAckOpcode },
|
||||
/*0x0DD*/ { "SMSG_MONSTER_MOVE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x0DE*/ { "SMSG_MOVE_WATER_WALK", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x0DF*/ { "SMSG_MOVE_LAND_WALK", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -280,7 +280,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x0F9*/ { "CMSG_OPENING_CINEMATIC", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x0FA*/ { "SMSG_TRIGGER_CINEMATIC", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x0FB*/ { "CMSG_NEXT_CINEMATIC_CAMERA", STATUS_LOGGEDIN, &WorldSession::HandleNextCinematicCamera },
|
||||
/*0x0FC*/ { "CMSG_COMPLETE_CINEMATIC", STATUS_LOGGEDIN, &WorldSession::HandleCompleteCinema },
|
||||
/*0x0FC*/ { "CMSG_COMPLETE_CINEMATIC", STATUS_LOGGEDIN, &WorldSession::HandleCompleteCinematic },
|
||||
/*0x0FD*/ { "SMSG_TUTORIAL_FLAGS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x0FE*/ { "CMSG_TUTORIAL_FLAG", STATUS_LOGGEDIN, &WorldSession::HandleTutorialFlag },
|
||||
/*0x0FF*/ { "CMSG_TUTORIAL_CLEAR", STATUS_LOGGEDIN, &WorldSession::HandleTutorialClear },
|
||||
@@ -418,11 +418,11 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x183*/ { "SMSG_QUESTGIVER_STATUS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x184*/ { "CMSG_QUESTGIVER_HELLO", STATUS_LOGGEDIN, &WorldSession::HandleQuestgiverHelloOpcode },
|
||||
/*0x185*/ { "SMSG_QUESTGIVER_QUEST_LIST", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x186*/ { "CMSG_QUESTGIVER_QUERY_QUEST", STATUS_LOGGEDIN, &WorldSession::HandleQuestgiverQuestQueryOpcode},
|
||||
/*0x187*/ { "CMSG_QUESTGIVER_QUEST_AUTOLAUNCH", STATUS_LOGGEDIN, &WorldSession::HandleQuestAutoLaunch },
|
||||
/*0x186*/ { "CMSG_QUESTGIVER_QUERY_QUEST", STATUS_LOGGEDIN, &WorldSession::HandleQuestgiverQueryQuestOpcode},
|
||||
/*0x187*/ { "CMSG_QUESTGIVER_QUEST_AUTOLAUNCH", STATUS_LOGGEDIN, &WorldSession::HandleQuestgiverQuestAutoLaunch },
|
||||
/*0x188*/ { "SMSG_QUESTGIVER_QUEST_DETAILS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x189*/ { "CMSG_QUESTGIVER_ACCEPT_QUEST", STATUS_LOGGEDIN, &WorldSession::HandleQuestgiverAcceptQuestOpcode},
|
||||
/*0x18A*/ { "CMSG_QUESTGIVER_COMPLETE_QUEST", STATUS_LOGGEDIN, &WorldSession::HandleQuestComplete },
|
||||
/*0x18A*/ { "CMSG_QUESTGIVER_COMPLETE_QUEST", STATUS_LOGGEDIN, &WorldSession::HandleQuestgiverCompleteQuest },
|
||||
/*0x18B*/ { "SMSG_QUESTGIVER_REQUEST_ITEMS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x18C*/ { "CMSG_QUESTGIVER_REQUEST_REWARD", STATUS_LOGGEDIN, &WorldSession::HandleQuestgiverRequestRewardOpcode},
|
||||
/*0x18D*/ { "SMSG_QUESTGIVER_OFFER_REWARD", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -441,7 +441,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x19A*/ { "SMSG_QUESTUPDATE_ADD_ITEM", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x19B*/ { "CMSG_QUEST_CONFIRM_ACCEPT", STATUS_LOGGEDIN, &WorldSession::HandleQuestConfirmAccept },
|
||||
/*0x19C*/ { "SMSG_QUEST_CONFIRM_ACCEPT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x19D*/ { "CMSG_PUSHQUESTTOPARTY", STATUS_LOGGEDIN, &WorldSession::HandleQuestPushToParty },
|
||||
/*0x19D*/ { "CMSG_PUSHQUESTTOPARTY", STATUS_LOGGEDIN, &WorldSession::HandlePushQuestToParty },
|
||||
/*0x19E*/ { "CMSG_LIST_INVENTORY", STATUS_LOGGEDIN, &WorldSession::HandleListInventoryOpcode },
|
||||
/*0x19F*/ { "SMSG_LIST_INVENTORY", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x1A0*/ { "CMSG_SELL_ITEM", STATUS_LOGGEDIN, &WorldSession::HandleSellItemOpcode },
|
||||
@@ -494,7 +494,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x1CF*/ { "SMSG_QUERY_TIME_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x1D0*/ { "SMSG_LOG_XPGAIN", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x1D1*/ { "SMSG_AURACASTLOG", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x1D2*/ { "CMSG_RECLAIM_CORPSE", STATUS_LOGGEDIN, &WorldSession::HandleCorpseReclaimOpcode },
|
||||
/*0x1D2*/ { "CMSG_RECLAIM_CORPSE", STATUS_LOGGEDIN, &WorldSession::HandleReclaimCorpseOpcode },
|
||||
/*0x1D3*/ { "CMSG_WRAP_ITEM", STATUS_LOGGEDIN, &WorldSession::HandleWrapItemOpcode },
|
||||
/*0x1D4*/ { "SMSG_LEVELUP_INFO", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x1D5*/ { "MSG_MINIMAP_PING", STATUS_LOGGEDIN, &WorldSession::HandleMinimapPingOpcode },
|
||||
@@ -525,7 +525,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x1EE*/ { "SMSG_AUTH_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x1EF*/ { "MSG_GM_SHOWLABEL", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x1F0*/ { "CMSG_PET_CAST_SPELL", STATUS_LOGGEDIN, &WorldSession::HandlePetCastSpellOpcode },
|
||||
/*0x1F1*/ { "MSG_SAVE_GUILD_EMBLEM", STATUS_LOGGEDIN, &WorldSession::HandleGuildSaveEmblemOpcode },
|
||||
/*0x1F1*/ { "MSG_SAVE_GUILD_EMBLEM", STATUS_LOGGEDIN, &WorldSession::HandleSaveGuildEmblemOpcode },
|
||||
/*0x1F2*/ { "MSG_TABARDVENDOR_ACTIVATE", STATUS_LOGGEDIN, &WorldSession::HandleTabardVendorActivateOpcode},
|
||||
/*0x1F3*/ { "SMSG_PLAY_SPELL_VISUAL", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x1F4*/ { "CMSG_ZONEUPDATE", STATUS_LOGGEDIN, &WorldSession::HandleZoneUpdateOpcode },
|
||||
@@ -598,9 +598,9 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x237*/ { "CMSG_CLEAR_EXPLORATION", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x238*/ { "CMSG_SEND_MAIL", STATUS_LOGGEDIN, &WorldSession::HandleSendMail },
|
||||
/*0x239*/ { "SMSG_SEND_MAIL_RESULT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x23A*/ { "CMSG_GET_MAIL_LIST", STATUS_LOGGEDIN, &WorldSession::HandleGetMail },
|
||||
/*0x23A*/ { "CMSG_GET_MAIL_LIST", STATUS_LOGGEDIN, &WorldSession::HandleGetMailList },
|
||||
/*0x23B*/ { "SMSG_MAIL_LIST_RESULT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x23C*/ { "CMSG_BATTLEFIELD_LIST", STATUS_LOGGEDIN, &WorldSession::HandleBattleGroundListOpcode },
|
||||
/*0x23C*/ { "CMSG_BATTLEFIELD_LIST", STATUS_LOGGEDIN, &WorldSession::HandleBattlefieldListOpcode },
|
||||
/*0x23D*/ { "SMSG_BATTLEFIELD_LIST", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x23E*/ { "CMSG_BATTLEFIELD_JOIN", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x23F*/ { "SMSG_BATTLEFIELD_WIN_OBSOLETE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -609,10 +609,10 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x242*/ { "CMSG_TAXIENABLENODE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x243*/ { "CMSG_ITEM_TEXT_QUERY", STATUS_LOGGEDIN, &WorldSession::HandleItemTextQuery },
|
||||
/*0x244*/ { "SMSG_ITEM_TEXT_QUERY_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x245*/ { "CMSG_MAIL_TAKE_MONEY", STATUS_LOGGEDIN, &WorldSession::HandleTakeMoney },
|
||||
/*0x246*/ { "CMSG_MAIL_TAKE_ITEM", STATUS_LOGGEDIN, &WorldSession::HandleTakeItem },
|
||||
/*0x247*/ { "CMSG_MAIL_MARK_AS_READ", STATUS_LOGGEDIN, &WorldSession::HandleMarkAsRead },
|
||||
/*0x248*/ { "CMSG_MAIL_RETURN_TO_SENDER", STATUS_LOGGEDIN, &WorldSession::HandleReturnToSender },
|
||||
/*0x245*/ { "CMSG_MAIL_TAKE_MONEY", STATUS_LOGGEDIN, &WorldSession::HandleMailTakeMoney },
|
||||
/*0x246*/ { "CMSG_MAIL_TAKE_ITEM", STATUS_LOGGEDIN, &WorldSession::HandleMailTakeItem },
|
||||
/*0x247*/ { "CMSG_MAIL_MARK_AS_READ", STATUS_LOGGEDIN, &WorldSession::HandleMailMarkAsRead },
|
||||
/*0x248*/ { "CMSG_MAIL_RETURN_TO_SENDER", STATUS_LOGGEDIN, &WorldSession::HandleMailReturnToSender },
|
||||
/*0x249*/ { "CMSG_MAIL_DELETE", STATUS_LOGGEDIN, &WorldSession::HandleMailDelete },
|
||||
/*0x24A*/ { "CMSG_MAIL_CREATE_TEXT_ITEM", STATUS_LOGGEDIN, &WorldSession::HandleMailCreateTextItem },
|
||||
/*0x24B*/ { "SMSG_SPELLLOGMISS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -672,7 +672,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x281*/ { "CMSG_RESET_FACTION_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x282*/ { "CMSG_AUTOSTORE_BANK_ITEM", STATUS_LOGGEDIN, &WorldSession::HandleAutoStoreBankItemOpcode },
|
||||
/*0x283*/ { "CMSG_AUTOBANK_ITEM", STATUS_LOGGEDIN, &WorldSession::HandleAutoBankItemOpcode },
|
||||
/*0x284*/ { "MSG_QUERY_NEXT_MAIL_TIME", STATUS_LOGGEDIN, &WorldSession::HandleMsgQueryNextMailtime },
|
||||
/*0x284*/ { "MSG_QUERY_NEXT_MAIL_TIME", STATUS_LOGGEDIN, &WorldSession::HandleQueryNextMailTime },
|
||||
/*0x285*/ { "SMSG_RECEIVED_MAIL", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x286*/ { "SMSG_RAID_GROUP_ONLY", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x287*/ { "CMSG_SET_DURABILITY_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
@@ -682,8 +682,8 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x28B*/ { "CMSG_SET_PVP_TITLE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x28C*/ { "SMSG_PVP_CREDIT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x28D*/ { "SMSG_AUCTION_REMOVED_NOTIFICATION", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x28E*/ { "CMSG_GROUP_RAID_CONVERT", STATUS_LOGGEDIN, &WorldSession::HandleRaidConvertOpcode },
|
||||
/*0x28F*/ { "CMSG_GROUP_ASSISTANT_LEADER", STATUS_LOGGEDIN, &WorldSession::HandleGroupAssistantOpcode },
|
||||
/*0x28E*/ { "CMSG_GROUP_RAID_CONVERT", STATUS_LOGGEDIN, &WorldSession::HandleGroupRaidConvertOpcode },
|
||||
/*0x28F*/ { "CMSG_GROUP_ASSISTANT_LEADER", STATUS_LOGGEDIN, &WorldSession::HandleGroupAssistantLeaderOpcode},
|
||||
/*0x290*/ { "CMSG_BUYBACK_ITEM", STATUS_LOGGEDIN, &WorldSession::HandleBuybackItem },
|
||||
/*0x291*/ { "SMSG_SERVER_MESSAGE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x292*/ { "CMSG_MEETINGSTONE_JOIN", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
@@ -710,7 +710,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x2A7*/ { "SMSG_GAMEOBJECT_RESET_STATE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2A8*/ { "CMSG_REPAIR_ITEM", STATUS_LOGGEDIN, &WorldSession::HandleRepairItemOpcode },
|
||||
/*0x2A9*/ { "SMSG_CHAT_PLAYER_NOT_FOUND", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2AA*/ { "MSG_TALENT_WIPE_CONFIRM", STATUS_LOGGEDIN, &WorldSession::HandleTalentWipeOpcode },
|
||||
/*0x2AA*/ { "MSG_TALENT_WIPE_CONFIRM", STATUS_LOGGEDIN, &WorldSession::HandleTalentWipeConfirmOpcode },
|
||||
/*0x2AB*/ { "SMSG_SUMMON_REQUEST", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2AC*/ { "CMSG_SUMMON_RESPONSE", STATUS_LOGGEDIN, &WorldSession::HandleSummonResponseOpcode },
|
||||
/*0x2AD*/ { "MSG_MOVE_TOGGLE_GRAVITY_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
@@ -725,13 +725,13 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x2B6*/ { "SMSG_SCRIPT_MESSAGE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2B7*/ { "SMSG_DUEL_COUNTDOWN", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2B8*/ { "SMSG_AREA_TRIGGER_MESSAGE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2B9*/ { "CMSG_SHOWING_HELM", STATUS_LOGGEDIN, &WorldSession::HandleToggleHelmOpcode },
|
||||
/*0x2BA*/ { "CMSG_SHOWING_CLOAK", STATUS_LOGGEDIN, &WorldSession::HandleToggleCloakOpcode },
|
||||
/*0x2B9*/ { "CMSG_SHOWING_HELM", STATUS_LOGGEDIN, &WorldSession::HandleShowingHelmOpcode },
|
||||
/*0x2BA*/ { "CMSG_SHOWING_CLOAK", STATUS_LOGGEDIN, &WorldSession::HandleShowingCloakOpcode },
|
||||
/*0x2BB*/ { "SMSG_MEETINGSTONE_JOINFAILED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2BC*/ { "SMSG_PLAYER_SKINNED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2BD*/ { "SMSG_DURABILITY_DAMAGE_DEATH", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2BE*/ { "CMSG_SET_EXPLORATION", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x2BF*/ { "CMSG_SET_ACTIONBAR_TOGGLES", STATUS_AUTHED, &WorldSession::HandleSetActionBar },
|
||||
/*0x2BF*/ { "CMSG_SET_ACTIONBAR_TOGGLES", STATUS_AUTHED, &WorldSession::HandleSetActionBarToggles },
|
||||
/*0x2C0*/ { "UMSG_DELETE_GUILD_CHARTER", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x2C1*/ { "MSG_PETITION_RENAME", STATUS_LOGGEDIN, &WorldSession::HandlePetitionRenameOpcode },
|
||||
/*0x2C2*/ { "SMSG_INIT_WORLD_STATES", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -739,9 +739,9 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x2C4*/ { "CMSG_ITEM_NAME_QUERY", STATUS_LOGGEDIN, &WorldSession::HandleItemNameQueryOpcode },
|
||||
/*0x2C5*/ { "SMSG_ITEM_NAME_QUERY_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2C6*/ { "SMSG_PET_ACTION_FEEDBACK", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2C7*/ { "CMSG_CHAR_RENAME", STATUS_AUTHED, &WorldSession::HandleChangePlayerNameOpcode },
|
||||
/*0x2C7*/ { "CMSG_CHAR_RENAME", STATUS_AUTHED, &WorldSession::HandleCharRenameOpcode },
|
||||
/*0x2C8*/ { "SMSG_CHAR_RENAME", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2C9*/ { "CMSG_MOVE_SPLINE_DONE", STATUS_LOGGEDIN, &WorldSession::HandleTaxiNextDestinationOpcode },
|
||||
/*0x2C9*/ { "CMSG_MOVE_SPLINE_DONE", STATUS_LOGGEDIN, &WorldSession::HandleMoveSplineDoneOpcode },
|
||||
/*0x2CA*/ { "CMSG_MOVE_FALL_RESET", STATUS_LOGGEDIN, &WorldSession::HandleMovementOpcodes },
|
||||
/*0x2CB*/ { "SMSG_INSTANCE_SAVE_CREATED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2CC*/ { "SMSG_RAID_INSTANCE_INFO", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -753,9 +753,9 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x2D2*/ { "SMSG_PLAY_SOUND", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2D3*/ { "CMSG_BATTLEFIELD_STATUS", STATUS_LOGGEDIN, &WorldSession::HandleBattlefieldStatusOpcode },
|
||||
/*0x2D4*/ { "SMSG_BATTLEFIELD_STATUS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2D5*/ { "CMSG_BATTLEFIELD_PORT", STATUS_LOGGEDIN, &WorldSession::HandleBattleGroundPlayerPortOpcode},
|
||||
/*0x2D5*/ { "CMSG_BATTLEFIELD_PORT", STATUS_LOGGEDIN, &WorldSession::HandleBattleFieldPortOpcode },
|
||||
/*0x2D6*/ { "MSG_INSPECT_HONOR_STATS", STATUS_LOGGEDIN, &WorldSession::HandleInspectHonorStatsOpcode },
|
||||
/*0x2D7*/ { "CMSG_BATTLEMASTER_HELLO", STATUS_LOGGEDIN, &WorldSession::HandleBattleGroundHelloOpcode },
|
||||
/*0x2D7*/ { "CMSG_BATTLEMASTER_HELLO", STATUS_LOGGEDIN, &WorldSession::HandleBattlemasterHelloOpcode },
|
||||
/*0x2D8*/ { "CMSG_MOVE_START_SWIM_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x2D9*/ { "CMSG_MOVE_STOP_SWIM_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x2DA*/ { "SMSG_FORCE_WALK_SPEED_CHANGE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -764,8 +764,8 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x2DD*/ { "CMSG_FORCE_SWIM_BACK_SPEED_CHANGE_ACK", STATUS_LOGGEDIN, &WorldSession::HandleForceSpeedChangeAck },
|
||||
/*0x2DE*/ { "SMSG_FORCE_TURN_RATE_CHANGE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2DF*/ { "CMSG_FORCE_TURN_RATE_CHANGE_ACK", STATUS_LOGGEDIN, &WorldSession::HandleForceSpeedChangeAck },
|
||||
/*0x2E0*/ { "MSG_PVP_LOG_DATA", STATUS_LOGGEDIN, &WorldSession::HandleBattleGroundPVPlogdataOpcode},
|
||||
/*0x2E1*/ { "CMSG_LEAVE_BATTLEFIELD", STATUS_LOGGEDIN, &WorldSession::HandleBattleGroundLeaveOpcode },
|
||||
/*0x2E0*/ { "MSG_PVP_LOG_DATA", STATUS_LOGGEDIN, &WorldSession::HandlePVPLogDataOpcode },
|
||||
/*0x2E1*/ { "CMSG_LEAVE_BATTLEFIELD", STATUS_LOGGEDIN, &WorldSession::HandleLeaveBattlefieldOpcode },
|
||||
/*0x2E2*/ { "CMSG_AREA_SPIRIT_HEALER_QUERY", STATUS_LOGGEDIN, &WorldSession::HandleAreaSpiritHealerQueryOpcode},
|
||||
/*0x2E3*/ { "CMSG_AREA_SPIRIT_HEALER_QUEUE", STATUS_LOGGEDIN, &WorldSession::HandleAreaSpiritHealerQueueOpcode},
|
||||
/*0x2E4*/ { "SMSG_AREA_SPIRIT_HEALER_TIME", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -778,7 +778,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x2EB*/ { "SMSG_BINDER_CONFIRM", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2EC*/ { "SMSG_BATTLEGROUND_PLAYER_JOINED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2ED*/ { "SMSG_BATTLEGROUND_PLAYER_LEFT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2EE*/ { "CMSG_BATTLEMASTER_JOIN", STATUS_LOGGEDIN, &WorldSession::HandleBattleGroundJoinOpcode },
|
||||
/*0x2EE*/ { "CMSG_BATTLEMASTER_JOIN", STATUS_LOGGEDIN, &WorldSession::HandleBattlemasterJoinOpcode },
|
||||
/*0x2EF*/ { "SMSG_ADDON_INFO", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2F0*/ { "CMSG_PET_UNLEARN", STATUS_LOGGEDIN, &WorldSession::HandlePetUnlearnOpcode },
|
||||
/*0x2F1*/ { "SMSG_PET_UNLEARN_CONFIRM", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -792,7 +792,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x2F9*/ { "SMSG_MINIGAME_MOVE_FAILED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2FA*/ { "SMSG_RAID_INSTANCE_MESSAGE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2FB*/ { "SMSG_COMPRESSED_MOVES", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2FC*/ { "CMSG_GUILD_INFO_TEXT", STATUS_LOGGEDIN, &WorldSession::HandleGuildChangeInfoOpcode },
|
||||
/*0x2FC*/ { "CMSG_GUILD_INFO_TEXT", STATUS_LOGGEDIN, &WorldSession::HandleGuildChangeInfoTextOpcode },
|
||||
/*0x2FD*/ { "SMSG_CHAT_RESTRICTED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2FE*/ { "SMSG_SPLINE_SET_RUN_SPEED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x2FF*/ { "SMSG_SPLINE_SET_RUN_BACK_SPEED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -814,13 +814,13 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x30F*/ { "CMSG_GM_NUKE_ACCOUNT", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x310*/ { "MSG_GM_DESTROY_CORPSE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x311*/ { "CMSG_GM_DESTROY_ONLINE_CORPSE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x312*/ { "CMSG_ACTIVATETAXIEXPRESS", STATUS_LOGGEDIN, &WorldSession::HandleActivateTaxiFarOpcode },
|
||||
/*0x312*/ { "CMSG_ACTIVATETAXIEXPRESS", STATUS_LOGGEDIN, &WorldSession::HandleActivateTaxiExpressOpcode },
|
||||
/*0x313*/ { "SMSG_SET_FACTION_ATWAR", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x314*/ { "SMSG_GAMETIMEBIAS_SET", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x315*/ { "CMSG_DEBUG_ACTIONS_START", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x316*/ { "CMSG_DEBUG_ACTIONS_STOP", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x317*/ { "CMSG_SET_FACTION_INACTIVE", STATUS_LOGGEDIN, &WorldSession::HandleSetWatchedFactionInactiveOpcode},
|
||||
/*0x318*/ { "CMSG_SET_WATCHED_FACTION", STATUS_LOGGEDIN, &WorldSession::HandleSetWatchedFactionIndexOpcode},
|
||||
/*0x317*/ { "CMSG_SET_FACTION_INACTIVE", STATUS_LOGGEDIN, &WorldSession::HandleSetFactionInactiveOpcode },
|
||||
/*0x318*/ { "CMSG_SET_WATCHED_FACTION", STATUS_LOGGEDIN, &WorldSession::HandleSetWatchedFactionOpcode },
|
||||
/*0x319*/ { "MSG_MOVE_TIME_SKIPPED", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x31A*/ { "SMSG_SPLINE_MOVE_ROOT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x31B*/ { "CMSG_SET_EXPLORATION_ALL", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
@@ -829,7 +829,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x31E*/ { "SMSG_INSTANCE_RESET", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x31F*/ { "SMSG_INSTANCE_RESET_FAILED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x320*/ { "SMSG_UPDATE_LAST_INSTANCE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x321*/ { "MSG_RAID_TARGET_UPDATE", STATUS_LOGGEDIN, &WorldSession::HandleRaidIconTargetOpcode },
|
||||
/*0x321*/ { "MSG_RAID_TARGET_UPDATE", STATUS_LOGGEDIN, &WorldSession::HandleRaidTargetUpdateOpcode },
|
||||
/*0x322*/ { "MSG_RAID_READY_CHECK", STATUS_LOGGEDIN, &WorldSession::HandleRaidReadyCheckOpcode },
|
||||
/*0x323*/ { "CMSG_LUA_USAGE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x324*/ { "SMSG_PET_ACTION_SOUND", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -837,7 +837,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x326*/ { "SMSG_GHOSTEE_GONE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x327*/ { "CMSG_GM_UPDATE_TICKET_STATUS", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x328*/ { "SMSG_GM_TICKET_STATUS_UPDATE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x329*/ { "MSG_SET_DUNGEON_DIFFICULTY", STATUS_LOGGEDIN, &WorldSession::HandleDungeonDifficultyOpcode },
|
||||
/*0x329*/ { "MSG_SET_DUNGEON_DIFFICULTY", STATUS_LOGGEDIN, &WorldSession::HandleSetDungeonDifficultyOpcode},
|
||||
/*0x32A*/ { "CMSG_GMSURVEY_SUBMIT", STATUS_NEVER, &WorldSession::Handle_NULL },//LOGGEDIN, &WorldSession::HandleGMSurveySubmit },
|
||||
/*0x32B*/ { "SMSG_UPDATE_INSTANCE_OWNERSHIP", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x32C*/ { "CMSG_IGNORE_KNOCKBACK_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
@@ -865,7 +865,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x342*/ { "MSG_MOVE_STOP_SWIM_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x343*/ { "SMSG_MOVE_SET_CAN_FLY", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x344*/ { "SMSG_MOVE_UNSET_CAN_FLY", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x345*/ { "CMSG_MOVE_SET_CAN_FLY_ACK", STATUS_LOGGEDIN, &WorldSession::HandleMoveFlyModeChangeAckOpcode},
|
||||
/*0x345*/ { "CMSG_MOVE_SET_CAN_FLY_ACK", STATUS_LOGGEDIN, &WorldSession::HandleMoveSetCanFlyAckOpcode },
|
||||
/*0x346*/ { "CMSG_MOVE_SET_FLY", STATUS_LOGGEDIN, &WorldSession::HandleMovementOpcodes },
|
||||
/*0x347*/ { "CMSG_SOCKET_GEMS", STATUS_LOGGEDIN, &WorldSession::HandleSocketOpcode },
|
||||
/*0x348*/ { "CMSG_ARENA_TEAM_CREATE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
@@ -875,30 +875,30 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x34C*/ { "SMSG_ARENA_TEAM_QUERY_RESPONSE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x34D*/ { "CMSG_ARENA_TEAM_ROSTER", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamRosterOpcode },
|
||||
/*0x34E*/ { "SMSG_ARENA_TEAM_ROSTER", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x34F*/ { "CMSG_ARENA_TEAM_INVITE", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamAddMemberOpcode },
|
||||
/*0x34F*/ { "CMSG_ARENA_TEAM_INVITE", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamInviteOpcode },
|
||||
/*0x350*/ { "SMSG_ARENA_TEAM_INVITE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x351*/ { "CMSG_ARENA_TEAM_ACCEPT", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamInviteAcceptOpcode},
|
||||
/*0x352*/ { "CMSG_ARENA_TEAM_DECLINE", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamInviteDeclineOpcode},
|
||||
/*0x351*/ { "CMSG_ARENA_TEAM_ACCEPT", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamAcceptOpcode },
|
||||
/*0x352*/ { "CMSG_ARENA_TEAM_DECLINE", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamDeclineOpcode },
|
||||
/*0x353*/ { "CMSG_ARENA_TEAM_LEAVE", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamLeaveOpcode },
|
||||
/*0x354*/ { "CMSG_ARENA_TEAM_REMOVE", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamRemoveFromTeamOpcode},
|
||||
/*0x354*/ { "CMSG_ARENA_TEAM_REMOVE", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamRemoveOpcode },
|
||||
/*0x355*/ { "CMSG_ARENA_TEAM_DISBAND", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamDisbandOpcode },
|
||||
/*0x356*/ { "CMSG_ARENA_TEAM_LEADER", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamPromoteToCaptainOpcode},
|
||||
/*0x356*/ { "CMSG_ARENA_TEAM_LEADER", STATUS_LOGGEDIN, &WorldSession::HandleArenaTeamLeaderOpcode },
|
||||
/*0x357*/ { "SMSG_ARENA_TEAM_EVENT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x358*/ { "CMSG_BATTLEMASTER_JOIN_ARENA", STATUS_LOGGEDIN, &WorldSession::HandleBattleGroundArenaJoin },
|
||||
/*0x358*/ { "CMSG_BATTLEMASTER_JOIN_ARENA", STATUS_LOGGEDIN, &WorldSession::HandleBattlemasterJoinArena },
|
||||
/*0x359*/ { "MSG_MOVE_START_ASCEND", STATUS_LOGGEDIN, &WorldSession::HandleMovementOpcodes },
|
||||
/*0x35A*/ { "MSG_MOVE_STOP_ASCEND", STATUS_LOGGEDIN, &WorldSession::HandleMovementOpcodes },
|
||||
/*0x35B*/ { "SMSG_ARENA_TEAM_STATS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x35C*/ { "CMSG_LFG_SET_AUTOJOIN", STATUS_AUTHED, &WorldSession::HandleLfgAutoJoinOpcode },
|
||||
/*0x35D*/ { "CMSG_LFG_CLEAR_AUTOJOIN", STATUS_LOGGEDIN, &WorldSession::HandleLfgCancelAutoJoinOpcode },
|
||||
/*0x35E*/ { "CMSG_LFM_SET_AUTOFILL", STATUS_AUTHED, &WorldSession::HandleLfmAutoAddMembersOpcode },
|
||||
/*0x35F*/ { "CMSG_LFM_CLEAR_AUTOFILL", STATUS_LOGGEDIN, &WorldSession::HandleLfmCancelAutoAddmembersOpcode},
|
||||
/*0x35C*/ { "CMSG_LFG_SET_AUTOJOIN", STATUS_AUTHED, &WorldSession::HandleLfgSetAutoJoinOpcode },
|
||||
/*0x35D*/ { "CMSG_LFG_CLEAR_AUTOJOIN", STATUS_LOGGEDIN, &WorldSession::HandleLfgClearAutoJoinOpcode },
|
||||
/*0x35E*/ { "CMSG_LFM_SET_AUTOFILL", STATUS_AUTHED, &WorldSession::HandleLfmSetAutoFillOpcode },
|
||||
/*0x35F*/ { "CMSG_LFM_CLEAR_AUTOFILL", STATUS_LOGGEDIN, &WorldSession::HandleLfmClearAutoFillOpcode },
|
||||
/*0x360*/ { "CMSG_ACCEPT_LFG_MATCH", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x361*/ { "CMSG_DECLINE_LFG_MATCH", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x362*/ { "CMSG_CANCEL_PENDING_LFG", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x363*/ { "CMSG_CLEAR_LOOKING_FOR_GROUP", STATUS_LOGGEDIN, &WorldSession::HandleLfgClearOpcode },
|
||||
/*0x364*/ { "CMSG_CLEAR_LOOKING_FOR_MORE", STATUS_LOGGEDIN, &WorldSession::HandleLfmSetNoneOpcode },
|
||||
/*0x365*/ { "CMSG_SET_LOOKING_FOR_MORE", STATUS_LOGGEDIN, &WorldSession::HandleLfmSetOpcode },
|
||||
/*0x366*/ { "CMSG_SET_LFG_COMMENT", STATUS_LOGGEDIN, &WorldSession::HandleLfgSetCommentOpcode },
|
||||
/*0x364*/ { "CMSG_CLEAR_LOOKING_FOR_MORE", STATUS_LOGGEDIN, &WorldSession::HandleLfmClearOpcode },
|
||||
/*0x365*/ { "CMSG_SET_LOOKING_FOR_MORE", STATUS_LOGGEDIN, &WorldSession::HandleSetLfmOpcode },
|
||||
/*0x366*/ { "CMSG_SET_LFG_COMMENT", STATUS_LOGGEDIN, &WorldSession::HandleSetLfgCommentOpcode },
|
||||
/*0x367*/ { "SMSG_LFG_TIMEDOUT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x368*/ { "SMSG_LFG_OTHER_TIMEDOUT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x369*/ { "SMSG_LFG_AUTOJOIN_FAILED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -912,12 +912,12 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x371*/ { "SMSG_LFG_PENDING_MATCH", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x372*/ { "SMSG_LFG_PENDING_MATCH_DONE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x373*/ { "SMSG_TITLE_EARNED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x374*/ { "CMSG_SET_TITLE", STATUS_LOGGEDIN, &WorldSession::HandleChooseTitleOpcode },
|
||||
/*0x375*/ { "CMSG_CANCEL_MOUNT_AURA", STATUS_LOGGEDIN, &WorldSession::HandleDismountOpcode },
|
||||
/*0x374*/ { "CMSG_SET_TITLE", STATUS_LOGGEDIN, &WorldSession::HandleSetTitleOpcode },
|
||||
/*0x375*/ { "CMSG_CANCEL_MOUNT_AURA", STATUS_LOGGEDIN, &WorldSession::HandleCancelMountAuraOpcode },
|
||||
/*0x376*/ { "SMSG_ARENA_ERROR", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x377*/ { "MSG_INSPECT_ARENA_TEAMS", STATUS_LOGGEDIN, &WorldSession::HandleInspectArenaStatsOpcode },
|
||||
/*0x377*/ { "MSG_INSPECT_ARENA_TEAMS", STATUS_LOGGEDIN, &WorldSession::HandleInspectArenaTeamsOpcode },
|
||||
/*0x378*/ { "SMSG_DEATH_RELEASE_LOC", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x379*/ { "CMSG_CANCEL_TEMP_ENCHANTMENT", STATUS_LOGGEDIN, &WorldSession::HandleCancelTempItemEnchantmentOpcode},
|
||||
/*0x379*/ { "CMSG_CANCEL_TEMP_ENCHANTMENT", STATUS_LOGGEDIN, &WorldSession::HandleCancelTempEnchantmentOpcode},
|
||||
/*0x37A*/ { "SMSG_FORCED_DEATH_UPDATE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x37B*/ { "CMSG_CHEAT_SET_HONOR_CURRENCY", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x37C*/ { "CMSG_CHEAT_SET_ARENA_CURRENCY", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
@@ -936,9 +936,9 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x389*/ { "CMSG_SET_TAXI_BENCHMARK_MODE", STATUS_AUTHED, &WorldSession::HandleSetTaxiBenchmarkOpcode },
|
||||
/*0x38A*/ { "SMSG_JOINED_BATTLEGROUND_QUEUE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x38B*/ { "SMSG_REALM_SPLIT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x38C*/ { "CMSG_REALM_SPLIT", STATUS_AUTHED, &WorldSession::HandleRealmStateRequestOpcode },
|
||||
/*0x38C*/ { "CMSG_REALM_SPLIT", STATUS_AUTHED, &WorldSession::HandleRealmSplitOpcode },
|
||||
/*0x38D*/ { "CMSG_MOVE_CHNG_TRANSPORT", STATUS_LOGGEDIN, &WorldSession::HandleMovementOpcodes },
|
||||
/*0x38E*/ { "MSG_PARTY_ASSIGNMENT", STATUS_LOGGEDIN, &WorldSession::HandleGroupPromoteOpcode },
|
||||
/*0x38E*/ { "MSG_PARTY_ASSIGNMENT", STATUS_LOGGEDIN, &WorldSession::HandlePartyAssignmentOpcode },
|
||||
/*0x38F*/ { "SMSG_OFFER_PETITION_ERROR", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x390*/ { "SMSG_TIME_SYNC_REQ", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x391*/ { "CMSG_TIME_SYNC_RESP", STATUS_LOGGEDIN, &WorldSession::HandleTimeSyncResp },
|
||||
@@ -971,7 +971,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x3AC*/ { "SMSG_DISMOUNT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3AD*/ { "MSG_MOVE_UPDATE_CAN_FLY", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3AE*/ { "MSG_RAID_READY_CHECK_CONFIRM", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3AF*/ { "CMSG_VOICE_SESSION_ENABLE", STATUS_AUTHED, &WorldSession::HandleVoiceSettingsOpcode },
|
||||
/*0x3AF*/ { "CMSG_VOICE_SESSION_ENABLE", STATUS_AUTHED, &WorldSession::HandleVoiceSessionEnableOpcode },
|
||||
/*0x3B0*/ { "SMSG_VOICE_SESSION_ENABLE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3B1*/ { "SMSG_VOICE_PARENTAL_CONTROLS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3B2*/ { "CMSG_GM_WHISPER", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
@@ -994,8 +994,8 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x3C3*/ { "CMSG_CHEAT_PLAYER_LOOKUP", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3C4*/ { "SMSG_CHEAT_PLAYER_LOOKUP", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3C5*/ { "SMSG_KICK_REASON", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3C6*/ { "MSG_RAID_READY_CHECK_FINISHED", STATUS_LOGGEDIN, &WorldSession::HandleRaidReadyCheckFinishOpcode},
|
||||
/*0x3C7*/ { "CMSG_COMPLAIN", STATUS_LOGGEDIN, &WorldSession::HandleReportSpamOpcode },
|
||||
/*0x3C6*/ { "MSG_RAID_READY_CHECK_FINISHED", STATUS_LOGGEDIN, &WorldSession::HandleRaidReadyCheckFinishedOpcode},
|
||||
/*0x3C7*/ { "CMSG_COMPLAIN", STATUS_LOGGEDIN, &WorldSession::HandleComplainOpcode },
|
||||
/*0x3C8*/ { "SMSG_COMPLAIN_RESULT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3C9*/ { "SMSG_FEATURE_SYSTEM_STATUS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3CA*/ { "CMSG_GM_SHOW_COMPLAINTS", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
@@ -1006,11 +1006,11 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x3CF*/ { "CMSG_CHANNEL_UNSILENCE_ALL", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3D0*/ { "CMSG_TARGET_CAST", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3D1*/ { "CMSG_TARGET_SCRIPT_CAST", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3D2*/ { "CMSG_CHANNEL_DISPLAY_LIST", STATUS_LOGGEDIN, &WorldSession::HandleChannelRosterQuery },
|
||||
/*0x3D3*/ { "CMSG_SET_ACTIVE_VOICE_CHANNEL", STATUS_AUTHED, &WorldSession::HandleChannelVoiceChatQuery },
|
||||
/*0x3D4*/ { "CMSG_GET_CHANNEL_MEMBER_COUNT", STATUS_LOGGEDIN, &WorldSession::HandleChannelInfoQuery },
|
||||
/*0x3D2*/ { "CMSG_CHANNEL_DISPLAY_LIST", STATUS_LOGGEDIN, &WorldSession::HandleChannelDisplayListQuery },
|
||||
/*0x3D3*/ { "CMSG_SET_ACTIVE_VOICE_CHANNEL", STATUS_AUTHED, &WorldSession::HandleSetActiveVoiceChannel },
|
||||
/*0x3D4*/ { "CMSG_GET_CHANNEL_MEMBER_COUNT", STATUS_LOGGEDIN, &WorldSession::HandleGetChannelMemberCount },
|
||||
/*0x3D5*/ { "SMSG_CHANNEL_MEMBER_COUNT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3D6*/ { "CMSG_CHANNEL_VOICE_ON", STATUS_LOGGEDIN, &WorldSession::HandleChannelEnableVoiceOpcode },
|
||||
/*0x3D6*/ { "CMSG_CHANNEL_VOICE_ON", STATUS_LOGGEDIN, &WorldSession::HandleChannelVoiceOnOpcode },
|
||||
/*0x3D7*/ { "CMSG_CHANNEL_VOICE_OFF", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3D8*/ { "CMSG_DEBUG_LIST_TARGETS", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3D9*/ { "SMSG_DEBUG_LIST_TARGETS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -1024,18 +1024,18 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x3E1*/ { "SMSG_COMSAT_DISCONNECT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3E2*/ { "SMSG_COMSAT_CONNECT_FAIL", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3E3*/ { "SMSG_VOICE_CHAT_STATUS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3E4*/ { "CMSG_REPORT_PVP_AFK", STATUS_LOGGEDIN, &WorldSession::HandleBattleGroundReportAFK },
|
||||
/*0x3E4*/ { "CMSG_REPORT_PVP_AFK", STATUS_LOGGEDIN, &WorldSession::HandleReportPvPAFK },
|
||||
/*0x3E5*/ { "CMSG_REPORT_PVP_AFK_RESULT", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3E6*/ { "CMSG_GUILD_BANKER_ACTIVATE", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankQuery },
|
||||
/*0x3E7*/ { "CMSG_GUILD_BANK_QUERY_TAB", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankTabColon },
|
||||
/*0x3E6*/ { "CMSG_GUILD_BANKER_ACTIVATE", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankerActivate },
|
||||
/*0x3E7*/ { "CMSG_GUILD_BANK_QUERY_TAB", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankQueryTab },
|
||||
/*0x3E8*/ { "SMSG_GUILD_BANK_LIST", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3E9*/ { "CMSG_GUILD_BANK_SWAP_ITEMS", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankDepositItem },
|
||||
/*0x3E9*/ { "CMSG_GUILD_BANK_SWAP_ITEMS", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankSwapItems },
|
||||
/*0x3EA*/ { "CMSG_GUILD_BANK_BUY_TAB", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankBuyTab },
|
||||
/*0x3EB*/ { "CMSG_GUILD_BANK_UPDATE_TAB", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankModifyTab },
|
||||
/*0x3EC*/ { "CMSG_GUILD_BANK_DEPOSIT_MONEY", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankDeposit },
|
||||
/*0x3ED*/ { "CMSG_GUILD_BANK_WITHDRAW_MONEY", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankWithdraw },
|
||||
/*0x3EE*/ { "MSG_GUILD_BANK_LOG_QUERY", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankLog },
|
||||
/*0x3EF*/ { "CMSG_SET_CHANNEL_WATCH", STATUS_LOGGEDIN, &WorldSession::HandleChannelJoinNotify },
|
||||
/*0x3EB*/ { "CMSG_GUILD_BANK_UPDATE_TAB", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankUpdateTab },
|
||||
/*0x3EC*/ { "CMSG_GUILD_BANK_DEPOSIT_MONEY", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankDepositMoney },
|
||||
/*0x3ED*/ { "CMSG_GUILD_BANK_WITHDRAW_MONEY", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankWithdrawMoney },
|
||||
/*0x3EE*/ { "MSG_GUILD_BANK_LOG_QUERY", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankLogQuery },
|
||||
/*0x3EF*/ { "CMSG_SET_CHANNEL_WATCH", STATUS_LOGGEDIN, &WorldSession::HandleSetChannelWatch },
|
||||
/*0x3F0*/ { "SMSG_USERLIST_ADD", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3F1*/ { "SMSG_USERLIST_REMOVE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3F2*/ { "SMSG_USERLIST_UPDATE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -1049,9 +1049,9 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x3FA*/ { "CMSG_GM_CHARACTER_RESTORE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3FB*/ { "CMSG_GM_CHARACTER_SAVE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x3FC*/ { "SMSG_VOICESESSION_FULL", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x3FD*/ { "MSG_GUILD_PERMISSIONS", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankGetRights },
|
||||
/*0x3FE*/ { "MSG_GUILD_BANK_MONEY_WITHDRAWN", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankGetMoneyAmount },
|
||||
/*0x3FF*/ { "MSG_GUILD_EVENT_LOG_QUERY", STATUS_LOGGEDIN, &WorldSession::HandleGuildEventLogOpcode },
|
||||
/*0x3FD*/ { "MSG_GUILD_PERMISSIONS", STATUS_LOGGEDIN, &WorldSession::HandleGuildPermissions },
|
||||
/*0x3FE*/ { "MSG_GUILD_BANK_MONEY_WITHDRAWN", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankMoneyWithdrawn },
|
||||
/*0x3FF*/ { "MSG_GUILD_EVENT_LOG_QUERY", STATUS_LOGGEDIN, &WorldSession::HandleGuildEventLogQueryOpcode },
|
||||
/*0x400*/ { "CMSG_MAELSTROM_RENAME_GUILD", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x401*/ { "CMSG_GET_MIRRORIMAGE_DATA", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x402*/ { "SMSG_MIRRORIMAGE_DATA", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
@@ -1061,9 +1061,9 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x406*/ { "SMSG_IGNORE_DIMINISHING_RETURNS_CHEAT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x407*/ { "CMSG_KEEP_ALIVE", STATUS_NEVER, &WorldSession::Handle_EarlyProccess },
|
||||
/*0x408*/ { "SMSG_RAID_READY_CHECK_ERROR", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x409*/ { "CMSG_OPT_OUT_OF_LOOT", STATUS_AUTHED, &WorldSession::HandleGroupPassOnLootOpcode },
|
||||
/*0x40A*/ { "MSG_QUERY_GUILD_BANK_TEXT", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankTabText },
|
||||
/*0x40B*/ { "CMSG_SET_GUILD_BANK_TEXT", STATUS_LOGGEDIN, &WorldSession::HandleGuildBankSetTabText },
|
||||
/*0x409*/ { "CMSG_OPT_OUT_OF_LOOT", STATUS_AUTHED, &WorldSession::HandleOptOutOfLootOpcode },
|
||||
/*0x40A*/ { "MSG_QUERY_GUILD_BANK_TEXT", STATUS_LOGGEDIN, &WorldSession::HandleQueryGuildBankTabText },
|
||||
/*0x40B*/ { "CMSG_SET_GUILD_BANK_TEXT", STATUS_LOGGEDIN, &WorldSession::HandleSetGuildBankTabText },
|
||||
/*0x40C*/ { "CMSG_SET_GRANTABLE_LEVELS", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x40D*/ { "CMSG_GRANT_LEVEL", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x40E*/ { "CMSG_REFER_A_FRIEND", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
@@ -1072,12 +1072,12 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x411*/ { "CMSG_GROUPACTION_THROTTLED", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x412*/ { "SMSG_OVERRIDE_LIGHT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x413*/ { "SMSG_TOTEM_CREATED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x414*/ { "CMSG_TOTEM_DESTROYED", STATUS_LOGGEDIN, &WorldSession::HandleTotemDestroy },
|
||||
/*0x414*/ { "CMSG_TOTEM_DESTROYED", STATUS_LOGGEDIN, &WorldSession::HandleTotemDestroyed },
|
||||
/*0x415*/ { "CMSG_EXPIRE_RAID_INSTANCE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x416*/ { "CMSG_NO_SPELL_VARIANCE", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x417*/ { "CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY", STATUS_LOGGEDIN, &WorldSession::HandleQuestgiverStatusQueryMultipleOpcode},
|
||||
/*0x417*/ { "CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY", STATUS_LOGGEDIN, &WorldSession::HandleQuestgiverStatusMultipleQuery},
|
||||
/*0x418*/ { "SMSG_QUESTGIVER_STATUS_MULTIPLE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x419*/ { "CMSG_SET_PLAYER_DECLINED_NAMES", STATUS_AUTHED, &WorldSession::HandleDeclinedPlayerNameOpcode },
|
||||
/*0x419*/ { "CMSG_SET_PLAYER_DECLINED_NAMES", STATUS_AUTHED, &WorldSession::HandleSetPlayerDeclinedNames },
|
||||
/*0x41A*/ { "SMSG_SET_PLAYER_DECLINED_NAMES_RESULT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x41B*/ { "CMSG_QUERY_SERVER_BUCK_DATA", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
/*0x41C*/ { "CMSG_CLEAR_SERVER_BUCK_DATA", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
@@ -1159,7 +1159,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x468*/ { "SMSG_ACHIEVEMENT_EARNED", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x469*/ { "SMSG_DYNAMIC_DROP_ROLL_RESULT", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x46A*/ { "SMSG_CRITERIA_UPDATE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x46B*/ { "CMSG_QUERY_INSPECT_ACHIEVEMENTS", STATUS_LOGGEDIN, &WorldSession::HandleInspectAchievements },
|
||||
/*0x46B*/ { "CMSG_QUERY_INSPECT_ACHIEVEMENTS", STATUS_LOGGEDIN, &WorldSession::HandleQueryInspectAchievements },
|
||||
/*0x46C*/ { "SMSG_RESPOND_INSPECT_ACHIEVEMENTS", STATUS_NEVER, &WorldSession::Handle_ServerSide },
|
||||
/*0x46D*/ { "CMSG_DISMISS_CONTROLLED_VEHICLE", STATUS_LOGGEDIN, &WorldSession::HandleDismissControlledVehicle },
|
||||
/*0x46E*/ { "CMSG_COMPLETE_ACHIEVEMENT_CHEAT", STATUS_NEVER, &WorldSession::Handle_NULL },
|
||||
|
||||
+1
-1
@@ -1241,7 +1241,7 @@ enum SessionStatus
|
||||
{
|
||||
STATUS_AUTHED = 0, ///< Player authenticated
|
||||
STATUS_LOGGEDIN, ///< Player in game
|
||||
STATUS_TRANSFER_PENDING, ///< Player transferring to another map
|
||||
STATUS_TRANSFER, ///< Player transferring to another map
|
||||
STATUS_NEVER ///< Opcode not accepted from client (deprecated or server side only)
|
||||
};
|
||||
|
||||
|
||||
+133
-152
@@ -1536,7 +1536,7 @@ void Player::BuildEnumData( QueryResult * result, WorldPacket * p_data )
|
||||
const ItemPrototype * proto = objmgr.GetItemPrototype(item_id);
|
||||
SpellItemEnchantmentEntry const *enchant = NULL;
|
||||
|
||||
for(uint8 enchantSlot = PERM_ENCHANTMENT_SLOT; enchantSlot<=TEMP_ENCHANTMENT_SLOT; enchantSlot++)
|
||||
for(uint8 enchantSlot = PERM_ENCHANTMENT_SLOT; enchantSlot <= TEMP_ENCHANTMENT_SLOT; ++enchantSlot)
|
||||
{
|
||||
uint32 enchantId = GetUInt32Value(visualbase+1+enchantSlot);
|
||||
if(enchant = sSpellItemEnchantmentStore.LookupEntry(enchantId))
|
||||
@@ -3071,7 +3071,7 @@ bool Player::IsNeedCastPassiveSpellAtLearn(SpellEntry const* spellInfo) const
|
||||
|
||||
switch(spellInfo->Id)
|
||||
{
|
||||
// some spells not have stance data expacted cast at form change or present
|
||||
// some spells not have stance data expected cast at form change or present
|
||||
case 5420: need_cast = (m_form == FORM_TREE); break;
|
||||
case 5419: need_cast = (m_form == FORM_TRAVEL); break;
|
||||
case 7376: need_cast = (m_form == FORM_DEFENSIVESTANCE); break;
|
||||
@@ -3318,7 +3318,7 @@ void Player::RemoveSpellCooldown( uint32 spell_id, bool update /* = false */ )
|
||||
|
||||
if(update)
|
||||
{
|
||||
WorldPacket data(SMSG_CLEAR_COOLDOWN, (4+8));
|
||||
WorldPacket data(SMSG_CLEAR_COOLDOWN, 4+8);
|
||||
data << uint32(spell_id);
|
||||
data << uint64(GetGUID());
|
||||
SendDirectMessage(&data);
|
||||
@@ -3349,7 +3349,7 @@ void Player::RemoveArenaSpellCooldowns()
|
||||
entry->CategoryRecoveryTime <= 15 * MINUTE * IN_MILISECONDS )
|
||||
{
|
||||
// notify player
|
||||
WorldPacket data(SMSG_CLEAR_COOLDOWN, (4+8));
|
||||
WorldPacket data(SMSG_CLEAR_COOLDOWN, 4+8);
|
||||
data << uint32(itr->first);
|
||||
data << uint64(GetGUID());
|
||||
GetSession()->SendPacket(&data);
|
||||
@@ -3365,7 +3365,7 @@ void Player::RemoveAllSpellCooldown()
|
||||
{
|
||||
for(SpellCooldowns::const_iterator itr = m_spellCooldowns.begin();itr != m_spellCooldowns.end(); ++itr)
|
||||
{
|
||||
WorldPacket data(SMSG_CLEAR_COOLDOWN, (4+8));
|
||||
WorldPacket data(SMSG_CLEAR_COOLDOWN, 4+8);
|
||||
data << uint32(itr->first);
|
||||
data << uint64(GetGUID());
|
||||
GetSession()->SendPacket(&data);
|
||||
@@ -8967,7 +8967,7 @@ uint8 Player::_CanStoreItem_InSpecificSlot( uint8 bag, uint8 slot, ItemPosCountV
|
||||
if(slot >= VANITYPET_SLOT_START && slot < VANITYPET_SLOT_END)
|
||||
return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;
|
||||
|
||||
// currencytoken case (disabled until proper implement)
|
||||
// currencytoken case
|
||||
if(slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END && !(pProto->BagFamily & BAG_FAMILY_MASK_CURRENCY_TOKENS))
|
||||
return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;
|
||||
|
||||
@@ -9635,7 +9635,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
||||
}
|
||||
|
||||
// check free space for all items
|
||||
for (int k=0;k<count;k++)
|
||||
for (int k = 0; k < count; ++k)
|
||||
{
|
||||
Item *pItem = pItems[k];
|
||||
|
||||
@@ -9666,7 +9666,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
||||
{
|
||||
bool b_found = false;
|
||||
|
||||
for(int t = KEYRING_SLOT_START; t < KEYRING_SLOT_END; t++)
|
||||
for(int t = KEYRING_SLOT_START; t < KEYRING_SLOT_END; ++t)
|
||||
{
|
||||
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pItem2 && pItem2->GetEntry() == pItem->GetEntry() && inv_keys[t-KEYRING_SLOT_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
|
||||
@@ -9678,7 +9678,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
||||
}
|
||||
if (b_found) continue;
|
||||
|
||||
for(int t = CURRENCYTOKEN_SLOT_START; t < CURRENCYTOKEN_SLOT_END; t++)
|
||||
for(int t = CURRENCYTOKEN_SLOT_START; t < CURRENCYTOKEN_SLOT_END; ++t)
|
||||
{
|
||||
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pItem2 && pItem2->GetEntry() == pItem->GetEntry() && inv_tokens[t-CURRENCYTOKEN_SLOT_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
|
||||
@@ -9690,7 +9690,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
||||
}
|
||||
if (b_found) continue;
|
||||
|
||||
for(int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; t++)
|
||||
for(int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; ++t)
|
||||
{
|
||||
pItem2 = GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pItem2 && pItem2->GetEntry() == pItem->GetEntry() && inv_slot_items[t-INVENTORY_SLOT_ITEM_START] + pItem->GetCount() <= pProto->GetMaxStackSize())
|
||||
@@ -9702,7 +9702,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
||||
}
|
||||
if (b_found) continue;
|
||||
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; t++)
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
||||
{
|
||||
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pBag && ItemCanGoIntoBag(pItem->GetProto(), pBag->GetProto()))
|
||||
@@ -9757,7 +9757,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
||||
|
||||
if (b_found) continue;
|
||||
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; t++)
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
||||
{
|
||||
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pBag )
|
||||
@@ -9785,7 +9785,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
||||
|
||||
// search free slot
|
||||
bool b_found = false;
|
||||
for(int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; t++)
|
||||
for(int t = INVENTORY_SLOT_ITEM_START; t < INVENTORY_SLOT_ITEM_END; ++t)
|
||||
{
|
||||
if( inv_slot_items[t-INVENTORY_SLOT_ITEM_START] == 0 )
|
||||
{
|
||||
@@ -9797,7 +9797,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
|
||||
if (b_found) continue;
|
||||
|
||||
// search free slot in bags
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; t++)
|
||||
for(int t = INVENTORY_SLOT_BAG_START; !b_found && t < INVENTORY_SLOT_BAG_END; ++t)
|
||||
{
|
||||
pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, t );
|
||||
if( pBag )
|
||||
@@ -10106,14 +10106,14 @@ uint8 Player::CanBankItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *p
|
||||
}
|
||||
else
|
||||
{
|
||||
res = _CanStoreItem_InBag(bag,dest,pProto,count,false,false,pItem,NULL_BAG,slot);
|
||||
if(res!=EQUIP_ERR_OK)
|
||||
res = _CanStoreItem_InBag(bag,dest,pProto,count,false,true,pItem,NULL_BAG,slot);
|
||||
res = _CanStoreItem_InBag(bag, dest, pProto, count, false, false, pItem, NULL_BAG, slot);
|
||||
if(res != EQUIP_ERR_OK)
|
||||
res = _CanStoreItem_InBag(bag, dest, pProto, count, false, true, pItem, NULL_BAG, slot);
|
||||
|
||||
if(res!=EQUIP_ERR_OK)
|
||||
if(res != EQUIP_ERR_OK)
|
||||
return res;
|
||||
|
||||
if(count==0)
|
||||
if(count == 0)
|
||||
return EQUIP_ERR_OK;
|
||||
}
|
||||
}
|
||||
@@ -10125,10 +10125,10 @@ uint8 Player::CanBankItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *p
|
||||
{
|
||||
// in slots
|
||||
res = _CanStoreItem_InInventorySlots(BANK_SLOT_ITEM_START,BANK_SLOT_ITEM_END,dest,pProto,count,true,pItem,bag,slot);
|
||||
if(res!=EQUIP_ERR_OK)
|
||||
if(res != EQUIP_ERR_OK)
|
||||
return res;
|
||||
|
||||
if(count==0)
|
||||
if(count == 0)
|
||||
return EQUIP_ERR_OK;
|
||||
|
||||
// in special bags
|
||||
@@ -10398,7 +10398,7 @@ Item* Player::_StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, boo
|
||||
if (!pItem2)
|
||||
{
|
||||
if (clone)
|
||||
pItem = pItem->CloneItem(count,this);
|
||||
pItem = pItem->CloneItem(count, this);
|
||||
else
|
||||
pItem->SetCount(count);
|
||||
|
||||
@@ -10413,7 +10413,7 @@ Item* Player::_StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, boo
|
||||
if (bag == INVENTORY_SLOT_BAG_0)
|
||||
{
|
||||
m_items[slot] = pItem;
|
||||
SetUInt64Value( (uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2) ), pItem->GetGUID() );
|
||||
SetUInt64Value( PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), pItem->GetGUID() );
|
||||
pItem->SetUInt64Value( ITEM_FIELD_CONTAINED, GetGUID() );
|
||||
pItem->SetUInt64Value( ITEM_FIELD_OWNER, GetGUID() );
|
||||
|
||||
@@ -10422,7 +10422,7 @@ Item* Player::_StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, boo
|
||||
|
||||
// need update known currency
|
||||
if (slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END)
|
||||
UpdateKnownCurrencies(pItem->GetEntry(),true);
|
||||
UpdateKnownCurrencies(pItem->GetEntry(), true);
|
||||
|
||||
if (IsInWorld() && update)
|
||||
{
|
||||
@@ -10517,7 +10517,7 @@ Item* Player::EquipItem( uint16 pos, Item *pItem, bool update )
|
||||
|
||||
// item set bonuses applied only at equip and removed at unequip, and still active for broken items
|
||||
if(pProto && pProto->ItemSet)
|
||||
AddItemsSetItem(this,pItem);
|
||||
AddItemsSetItem(this, pItem);
|
||||
|
||||
_ApplyItemMods(pItem, slot, true);
|
||||
|
||||
@@ -10611,15 +10611,6 @@ void Player::QuickEquipItem( uint16 pos, Item *pItem)
|
||||
|
||||
void Player::SetVisibleItemSlot(uint8 slot, Item *pItem)
|
||||
{
|
||||
// PLAYER_VISIBLE_ITEM_i_CREATOR // Size: 2
|
||||
// PLAYER_VISIBLE_ITEM_i_0 // Size: 12
|
||||
// entry // Size: 1
|
||||
// inspected enchantments // Size: 6
|
||||
// ? // Size: 5
|
||||
// PLAYER_VISIBLE_ITEM_i_PROPERTIES // Size: 1 (property,suffix factor)
|
||||
// PLAYER_VISIBLE_ITEM_i_PAD // Size: 1
|
||||
// // = 16
|
||||
|
||||
if(pItem)
|
||||
{
|
||||
SetUInt64Value(PLAYER_VISIBLE_ITEM_1_CREATOR + (slot * MAX_VISIBLE_ITEM_OFFSET), pItem->GetUInt64Value(ITEM_FIELD_CREATOR));
|
||||
@@ -10661,14 +10652,14 @@ void Player::VisualizeItem( uint8 slot, Item *pItem)
|
||||
sLog.outDebug( "STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry());
|
||||
|
||||
m_items[slot] = pItem;
|
||||
SetUInt64Value( (uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2) ), pItem->GetGUID() );
|
||||
SetUInt64Value( PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), pItem->GetGUID() );
|
||||
pItem->SetUInt64Value( ITEM_FIELD_CONTAINED, GetGUID() );
|
||||
pItem->SetUInt64Value( ITEM_FIELD_OWNER, GetGUID() );
|
||||
pItem->SetSlot( slot );
|
||||
pItem->SetContainer( NULL );
|
||||
|
||||
if( slot < EQUIPMENT_SLOT_END )
|
||||
SetVisibleItemSlot(slot,pItem);
|
||||
SetVisibleItemSlot(slot, pItem);
|
||||
|
||||
pItem->SetState(ITEM_CHANGED, this);
|
||||
}
|
||||
@@ -10696,7 +10687,7 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update )
|
||||
// item set bonuses applied only at equip and removed at unequip, and still active for broken items
|
||||
|
||||
if(pProto && pProto->ItemSet)
|
||||
RemoveItemsSetItem(this,pProto);
|
||||
RemoveItemsSetItem(this, pProto);
|
||||
|
||||
_ApplyItemMods(pItem, slot, false);
|
||||
|
||||
@@ -10727,13 +10718,13 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update )
|
||||
}
|
||||
// need update known currency
|
||||
else if (slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END)
|
||||
UpdateKnownCurrencies(pItem->GetEntry(),false);
|
||||
UpdateKnownCurrencies(pItem->GetEntry(), false);
|
||||
|
||||
m_items[slot] = NULL;
|
||||
SetUInt64Value((uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot*2)), 0);
|
||||
SetUInt64Value(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), 0);
|
||||
|
||||
if ( slot < EQUIPMENT_SLOT_END )
|
||||
SetVisibleItemSlot(slot,NULL);
|
||||
SetVisibleItemSlot(slot, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -10754,8 +10745,8 @@ void Player::MoveItemFromInventory(uint8 bag, uint8 slot, bool update)
|
||||
{
|
||||
if(Item* it = GetItemByPos(bag,slot))
|
||||
{
|
||||
ItemRemovedQuestCheck(it->GetEntry(),it->GetCount());
|
||||
RemoveItem( bag,slot,update);
|
||||
ItemRemovedQuestCheck(it->GetEntry(), it->GetCount());
|
||||
RemoveItem(bag, slot, update);
|
||||
it->RemoveFromUpdateQueueOf(this);
|
||||
if(it->IsInWorld())
|
||||
{
|
||||
@@ -10769,13 +10760,13 @@ void Player::MoveItemFromInventory(uint8 bag, uint8 slot, bool update)
|
||||
void Player::MoveItemToInventory(ItemPosCountVec const& dest, Item* pItem, bool update, bool in_characterInventoryDB)
|
||||
{
|
||||
// update quest counters
|
||||
ItemAddedQuestCheck(pItem->GetEntry(),pItem->GetCount());
|
||||
ItemAddedQuestCheck(pItem->GetEntry(), pItem->GetCount());
|
||||
|
||||
// store item
|
||||
Item* pLastItem = StoreItem( dest, pItem, update);
|
||||
Item* pLastItem = StoreItem(dest, pItem, update);
|
||||
|
||||
// only set if not merged to existed stack (pItem can be deleted already but we can compare pointers any way)
|
||||
if(pLastItem==pItem)
|
||||
if(pLastItem == pItem)
|
||||
{
|
||||
// update owner for last item (this can be original item with wrong owner
|
||||
if(pLastItem->GetOwnerGUID() != GetGUID())
|
||||
@@ -10797,8 +10788,8 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
|
||||
// start from destroy contained items (only equipped bag can have its)
|
||||
if (pItem->IsBag() && pItem->IsEquipped()) // this also prevent infinity loop if empty bag stored in bag==slot
|
||||
{
|
||||
for (int i = 0; i < MAX_BAG_SIZE; i++)
|
||||
DestroyItem(slot,i,update);
|
||||
for (int i = 0; i < MAX_BAG_SIZE; ++i)
|
||||
DestroyItem(slot, i, update);
|
||||
}
|
||||
|
||||
if(pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPED))
|
||||
@@ -10811,7 +10802,7 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
|
||||
|
||||
if( bag == INVENTORY_SLOT_BAG_0 )
|
||||
{
|
||||
SetUInt64Value((uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot*2)), 0);
|
||||
SetUInt64Value(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), 0);
|
||||
|
||||
// equipment and equipped bags can have applied bonuses
|
||||
if ( slot < INVENTORY_SLOT_BAG_END )
|
||||
@@ -10820,7 +10811,7 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
|
||||
|
||||
// item set bonuses applied only at equip and removed at unequip, and still active for broken items
|
||||
if(pProto && pProto->ItemSet)
|
||||
RemoveItemsSetItem(this,pProto);
|
||||
RemoveItemsSetItem(this, pProto);
|
||||
|
||||
_ApplyItemMods(pItem, slot, false);
|
||||
}
|
||||
@@ -10837,11 +10828,11 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
|
||||
UpdateExpertise(OFF_ATTACK);
|
||||
|
||||
// equipment visual show
|
||||
SetVisibleItemSlot(slot,NULL);
|
||||
SetVisibleItemSlot(slot, NULL);
|
||||
}
|
||||
// need update known currency
|
||||
else if (slot >= CURRENCYTOKEN_SLOT_START && slot < CURRENCYTOKEN_SLOT_END)
|
||||
UpdateKnownCurrencies(pItem->GetEntry(),false);
|
||||
UpdateKnownCurrencies(pItem->GetEntry(), false);
|
||||
|
||||
m_items[slot] = NULL;
|
||||
}
|
||||
@@ -10879,7 +10870,7 @@ void Player::DestroyItemCount( uint32 item, uint32 count, bool update, bool uneq
|
||||
remcount += pItem->GetCount();
|
||||
DestroyItem( INVENTORY_SLOT_BAG_0, i, update);
|
||||
|
||||
if (remcount >=count)
|
||||
if (remcount >= count)
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -10907,7 +10898,7 @@ void Player::DestroyItemCount( uint32 item, uint32 count, bool update, bool uneq
|
||||
remcount += pItem->GetCount();
|
||||
DestroyItem( INVENTORY_SLOT_BAG_0, i, update);
|
||||
|
||||
if (remcount >=count)
|
||||
if (remcount >= count)
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -10940,7 +10931,7 @@ void Player::DestroyItemCount( uint32 item, uint32 count, bool update, bool uneq
|
||||
remcount += pItem->GetCount();
|
||||
DestroyItem( i, j, update );
|
||||
|
||||
if (remcount >=count)
|
||||
if (remcount >= count)
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -10967,12 +10958,12 @@ void Player::DestroyItemCount( uint32 item, uint32 count, bool update, bool uneq
|
||||
{
|
||||
if (pItem->GetCount() + remcount <= count)
|
||||
{
|
||||
if (!unequip_check || CanUnequipItem(INVENTORY_SLOT_BAG_0 << 8 | i,false) == EQUIP_ERR_OK )
|
||||
if (!unequip_check || CanUnequipItem(INVENTORY_SLOT_BAG_0 << 8 | i, false) == EQUIP_ERR_OK )
|
||||
{
|
||||
remcount += pItem->GetCount();
|
||||
DestroyItem( INVENTORY_SLOT_BAG_0, i, update);
|
||||
|
||||
if (remcount >=count)
|
||||
if (remcount >= count)
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -10997,12 +10988,12 @@ void Player::DestroyZoneLimitedItem( bool update, uint32 new_zone )
|
||||
// in inventory
|
||||
for(int i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; i++)
|
||||
if (Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
|
||||
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(),new_zone))
|
||||
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(), new_zone))
|
||||
DestroyItem( INVENTORY_SLOT_BAG_0, i, update);
|
||||
|
||||
for(int i = KEYRING_SLOT_START; i < QUESTBAG_SLOT_END; i++)
|
||||
if (Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
|
||||
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(),new_zone))
|
||||
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(), new_zone))
|
||||
DestroyItem( INVENTORY_SLOT_BAG_0, i, update);
|
||||
|
||||
// in inventory bags
|
||||
@@ -11010,13 +11001,13 @@ void Player::DestroyZoneLimitedItem( bool update, uint32 new_zone )
|
||||
if (Bag* pBag = (Bag*)GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
|
||||
for(uint32 j = 0; j < pBag->GetBagSize(); j++)
|
||||
if (Item* pItem = pBag->GetItemByPos(j))
|
||||
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(),new_zone))
|
||||
DestroyItem( i, j, update);
|
||||
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(), new_zone))
|
||||
DestroyItem(i, j, update);
|
||||
|
||||
// in equipment and bag list
|
||||
for(int i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_BAG_END; i++)
|
||||
if (Item* pItem = GetItemByPos( INVENTORY_SLOT_BAG_0, i ))
|
||||
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(),new_zone))
|
||||
if (pItem->IsLimitedToAnotherMapOrZone(GetMapId(), new_zone))
|
||||
DestroyItem( INVENTORY_SLOT_BAG_0, i, update);
|
||||
}
|
||||
|
||||
@@ -11056,7 +11047,7 @@ void Player::DestroyItemCount( Item* pItem, uint32 &count, bool update )
|
||||
|
||||
if( pItem->GetCount() <= count )
|
||||
{
|
||||
count-= pItem->GetCount();
|
||||
count -= pItem->GetCount();
|
||||
|
||||
DestroyItem( pItem->GetBagSlot(),pItem->GetSlot(), update);
|
||||
}
|
||||
@@ -11295,7 +11286,7 @@ void Player::SwapItem( uint16 src, uint16 dst )
|
||||
}
|
||||
|
||||
RemoveItem(srcbag, srcslot, true);
|
||||
EquipItem( dest, pSrcItem, true);
|
||||
EquipItem(dest, pSrcItem, true);
|
||||
AutoUnequipOffhandIfNeed();
|
||||
}
|
||||
|
||||
@@ -11425,7 +11416,7 @@ void Player::SwapItem( uint16 src, uint16 dst )
|
||||
ItemPrototype const* bagItemProto = bagItem->GetProto();
|
||||
if (!bagItemProto || !ItemCanGoIntoBag(bagItemProto, emotyProto))
|
||||
{
|
||||
// one from items not go to empry target bag
|
||||
// one from items not go to empty target bag
|
||||
SendEquipError( EQUIP_ERR_NONEMPTY_BAG_OVER_OTHER_BAG, pSrcItem, pDstItem );
|
||||
return;
|
||||
}
|
||||
@@ -11443,7 +11434,7 @@ void Player::SwapItem( uint16 src, uint16 dst )
|
||||
|
||||
// Items swap
|
||||
count = 0; // will pos in new bag
|
||||
for(int i=0; i< fullBag->GetBagSize(); ++i)
|
||||
for(int i = 0; i< fullBag->GetBagSize(); ++i)
|
||||
{
|
||||
Item *bagItem = fullBag->GetItemByPos(i);
|
||||
if (!bagItem)
|
||||
@@ -11522,7 +11513,7 @@ void Player::AddItemToBuyBackSlot( Item *pItem )
|
||||
uint32 etime = uint32(base - m_logintime + (30 * 3600));
|
||||
uint32 eslot = slot - BUYBACK_SLOT_START;
|
||||
|
||||
SetUInt64Value( PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + eslot * 2, pItem->GetGUID() );
|
||||
SetUInt64Value( PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + (eslot * 2), pItem->GetGUID() );
|
||||
ItemPrototype const *pProto = pItem->GetProto();
|
||||
if( pProto )
|
||||
SetUInt32Value( PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, pProto->SellPrice * pItem->GetCount() );
|
||||
@@ -11531,7 +11522,7 @@ void Player::AddItemToBuyBackSlot( Item *pItem )
|
||||
SetUInt32Value( PLAYER_FIELD_BUYBACK_TIMESTAMP_1 + eslot, (uint32)etime );
|
||||
|
||||
// move to next (for non filled list is move most optimized choice)
|
||||
if(m_currentBuybackSlot < BUYBACK_SLOT_END-1)
|
||||
if(m_currentBuybackSlot < BUYBACK_SLOT_END - 1)
|
||||
++m_currentBuybackSlot;
|
||||
}
|
||||
}
|
||||
@@ -11559,7 +11550,7 @@ void Player::RemoveItemFromBuyBackSlot( uint32 slot, bool del )
|
||||
m_items[slot] = NULL;
|
||||
|
||||
uint32 eslot = slot - BUYBACK_SLOT_START;
|
||||
SetUInt64Value( PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + eslot * 2, 0 );
|
||||
SetUInt64Value( PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + (eslot * 2), 0 );
|
||||
SetUInt32Value( PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, 0 );
|
||||
SetUInt32Value( PLAYER_FIELD_BUYBACK_TIMESTAMP_1 + eslot, 0 );
|
||||
|
||||
@@ -11571,7 +11562,7 @@ void Player::RemoveItemFromBuyBackSlot( uint32 slot, bool del )
|
||||
|
||||
void Player::SendEquipError( uint8 msg, Item* pItem, Item *pItem2 )
|
||||
{
|
||||
sLog.outDebug( "WORLD: Sent SMSG_INVENTORY_CHANGE_FAILURE (%u)",msg);
|
||||
sLog.outDebug( "WORLD: Sent SMSG_INVENTORY_CHANGE_FAILURE (%u)", msg);
|
||||
WorldPacket data( SMSG_INVENTORY_CHANGE_FAILURE, (msg == EQUIP_ERR_CANT_EQUIP_LEVEL_I ? 22 : 18) );
|
||||
data << uint8(msg);
|
||||
|
||||
@@ -11654,9 +11645,9 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly)
|
||||
if(m_itemDuration.empty())
|
||||
return;
|
||||
|
||||
sLog.outDebug("Player::UpdateItemDuration(%u,%u)", time,realtimeonly);
|
||||
sLog.outDebug("Player::UpdateItemDuration(%u,%u)", time, realtimeonly);
|
||||
|
||||
for(ItemDurationList::iterator itr = m_itemDuration.begin();itr != m_itemDuration.end(); )
|
||||
for(ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end(); )
|
||||
{
|
||||
Item* item = *itr;
|
||||
++itr; // current element can be erased in UpdateDuration
|
||||
@@ -11671,14 +11662,14 @@ void Player::UpdateEnchantTime(uint32 time)
|
||||
for(EnchantDurationList::iterator itr = m_enchantDuration.begin(),next;itr != m_enchantDuration.end();itr=next)
|
||||
{
|
||||
assert(itr->item);
|
||||
next=itr;
|
||||
next = itr;
|
||||
if(!itr->item->GetEnchantmentId(itr->slot))
|
||||
{
|
||||
next = m_enchantDuration.erase(itr);
|
||||
}
|
||||
else if(itr->leftduration <= time)
|
||||
{
|
||||
ApplyEnchantment(itr->item,itr->slot,false,false);
|
||||
ApplyEnchantment(itr->item, itr->slot, false, false);
|
||||
itr->item->ClearEnchantment(itr->slot);
|
||||
next = m_enchantDuration.erase(itr);
|
||||
}
|
||||
@@ -11692,25 +11683,25 @@ void Player::UpdateEnchantTime(uint32 time)
|
||||
|
||||
void Player::AddEnchantmentDurations(Item *item)
|
||||
{
|
||||
for(int x=0;x<MAX_ENCHANTMENT_SLOT;++x)
|
||||
for(int x = 0; x < MAX_ENCHANTMENT_SLOT; ++x)
|
||||
{
|
||||
if(!item->GetEnchantmentId(EnchantmentSlot(x)))
|
||||
continue;
|
||||
|
||||
uint32 duration = item->GetEnchantmentDuration(EnchantmentSlot(x));
|
||||
if( duration > 0 )
|
||||
AddEnchantmentDuration(item,EnchantmentSlot(x),duration);
|
||||
AddEnchantmentDuration(item, EnchantmentSlot(x), duration);
|
||||
}
|
||||
}
|
||||
|
||||
void Player::RemoveEnchantmentDurations(Item *item)
|
||||
{
|
||||
for(EnchantDurationList::iterator itr = m_enchantDuration.begin();itr != m_enchantDuration.end();)
|
||||
for(EnchantDurationList::iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end();)
|
||||
{
|
||||
if(itr->item == item)
|
||||
{
|
||||
// save duration in item
|
||||
item->SetEnchantmentDuration(EnchantmentSlot(itr->slot),itr->leftduration);
|
||||
item->SetEnchantmentDuration(EnchantmentSlot(itr->slot), itr->leftduration);
|
||||
itr = m_enchantDuration.erase(itr);
|
||||
}
|
||||
else
|
||||
@@ -11721,10 +11712,10 @@ void Player::RemoveEnchantmentDurations(Item *item)
|
||||
void Player::RemoveArenaEnchantments(EnchantmentSlot slot)
|
||||
{
|
||||
// remove enchantments from equipped items first to clean up the m_enchantDuration list
|
||||
for(EnchantDurationList::iterator itr = m_enchantDuration.begin(),next;itr != m_enchantDuration.end();itr=next)
|
||||
for(EnchantDurationList::iterator itr = m_enchantDuration.begin(), next; itr != m_enchantDuration.end(); itr = next)
|
||||
{
|
||||
next = itr;
|
||||
if(itr->slot==slot)
|
||||
if(itr->slot == slot)
|
||||
{
|
||||
if(itr->item && itr->item->GetEnchantmentId(slot))
|
||||
{
|
||||
@@ -11735,7 +11726,7 @@ void Player::RemoveArenaEnchantments(EnchantmentSlot slot)
|
||||
continue;
|
||||
}
|
||||
// remove from stats
|
||||
ApplyEnchantment(itr->item,slot,false,false);
|
||||
ApplyEnchantment(itr->item, slot, false, false);
|
||||
// remove visual
|
||||
itr->item->ClearEnchantment(slot);
|
||||
}
|
||||
@@ -11781,19 +11772,19 @@ void Player::AddEnchantmentDuration(Item *item,EnchantmentSlot slot,uint32 durat
|
||||
if(slot >= MAX_ENCHANTMENT_SLOT)
|
||||
return;
|
||||
|
||||
for(EnchantDurationList::iterator itr = m_enchantDuration.begin();itr != m_enchantDuration.end();++itr)
|
||||
for(EnchantDurationList::iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end(); ++itr)
|
||||
{
|
||||
if(itr->item == item && itr->slot == slot)
|
||||
{
|
||||
itr->item->SetEnchantmentDuration(itr->slot,itr->leftduration);
|
||||
itr->item->SetEnchantmentDuration(itr->slot, itr->leftduration);
|
||||
m_enchantDuration.erase(itr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(item && duration > 0 )
|
||||
{
|
||||
GetSession()->SendItemEnchantTimeUpdate(GetGUID(), item->GetGUID(),slot,uint32(duration/1000));
|
||||
m_enchantDuration.push_back(EnchantDuration(item,slot,duration));
|
||||
GetSession()->SendItemEnchantTimeUpdate(GetGUID(), item->GetGUID(), slot, uint32(duration/1000));
|
||||
m_enchantDuration.push_back(EnchantDuration(item, slot, duration));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11803,7 +11794,7 @@ void Player::ApplyEnchantment(Item *item,bool apply)
|
||||
ApplyEnchantment(item, EnchantmentSlot(slot), apply);
|
||||
}
|
||||
|
||||
void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool apply_dur, bool ignore_condition)
|
||||
void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool apply_dur, bool ignore_condition)
|
||||
{
|
||||
if(!item)
|
||||
return;
|
||||
@@ -11827,7 +11818,7 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
||||
|
||||
if (!item->IsBroken())
|
||||
{
|
||||
for (int s=0; s<3; s++)
|
||||
for (int s = 0; s < 3; ++s)
|
||||
{
|
||||
uint32 enchant_display_type = pEnchant->type[s];
|
||||
uint32 enchant_amount = pEnchant->amount[s];
|
||||
@@ -11861,11 +11852,11 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
||||
if (item_rand)
|
||||
{
|
||||
// Search enchant_amount
|
||||
for (int k=0; k<3; k++)
|
||||
for (int k = 0; k < 3; ++k)
|
||||
{
|
||||
if(item_rand->enchant_id[k] == enchant_id)
|
||||
{
|
||||
basepoints = int32((item_rand->prefix[k]*item->GetItemSuffixFactor()) / 10000 );
|
||||
basepoints = int32((item_rand->prefix[k] * item->GetItemSuffixFactor()) / 10000 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -11873,12 +11864,12 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
||||
}
|
||||
// Cast custom spell vs all equal basepoints getted from enchant_amount
|
||||
if (basepoints)
|
||||
CastCustomSpell(this,enchant_spell_id,&basepoints,&basepoints,&basepoints,true,item);
|
||||
CastCustomSpell(this, enchant_spell_id, &basepoints, &basepoints, &basepoints, true, item);
|
||||
else
|
||||
CastSpell(this,enchant_spell_id,true,item);
|
||||
CastSpell(this, enchant_spell_id, true, item);
|
||||
}
|
||||
else
|
||||
RemoveAurasDueToItemSpell(item,enchant_spell_id);
|
||||
RemoveAurasDueToItemSpell(item, enchant_spell_id);
|
||||
}
|
||||
break;
|
||||
case ITEM_ENCHANTMENT_TYPE_RESISTANCE:
|
||||
@@ -11887,11 +11878,11 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
||||
ItemRandomSuffixEntry const *item_rand = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId()));
|
||||
if(item_rand)
|
||||
{
|
||||
for (int k=0; k<3; k++)
|
||||
for (int k = 0; k < 3; ++k)
|
||||
{
|
||||
if(item_rand->enchant_id[k] == enchant_id)
|
||||
{
|
||||
enchant_amount = uint32((item_rand->prefix[k]*item->GetItemSuffixFactor()) / 10000 );
|
||||
enchant_amount = uint32((item_rand->prefix[k] * item->GetItemSuffixFactor()) / 10000 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -11907,11 +11898,11 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
||||
ItemRandomSuffixEntry const *item_rand_suffix = sItemRandomSuffixStore.LookupEntry(abs(item->GetItemRandomPropertyId()));
|
||||
if(item_rand_suffix)
|
||||
{
|
||||
for (int k=0; k<3; k++)
|
||||
for (int k = 0; k < 3; ++k)
|
||||
{
|
||||
if(item_rand_suffix->enchant_id[k] == enchant_id)
|
||||
{
|
||||
enchant_amount = uint32((item_rand_suffix->prefix[k]*item->GetItemSuffixFactor()) / 10000 );
|
||||
enchant_amount = uint32((item_rand_suffix->prefix[k] * item->GetItemSuffixFactor()) / 10000 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -12108,12 +12099,12 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
||||
float addValue = 0.0f;
|
||||
if(item->GetSlot() == EQUIPMENT_SLOT_MAINHAND)
|
||||
{
|
||||
addValue = float(enchant_amount * item->GetProto()->Delay/1000.0f);
|
||||
addValue = float(enchant_amount * item->GetProto()->Delay / 1000.0f);
|
||||
HandleStatModifier(UNIT_MOD_DAMAGE_MAINHAND, TOTAL_VALUE, addValue, apply);
|
||||
}
|
||||
else if(item->GetSlot() == EQUIPMENT_SLOT_OFFHAND )
|
||||
{
|
||||
addValue = float(enchant_amount * item->GetProto()->Delay/1000.0f);
|
||||
addValue = float(enchant_amount * item->GetProto()->Delay / 1000.0f);
|
||||
HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_VALUE, addValue, apply);
|
||||
}
|
||||
}
|
||||
@@ -12146,27 +12137,27 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
||||
// set duration
|
||||
uint32 duration = item->GetEnchantmentDuration(slot);
|
||||
if(duration > 0)
|
||||
AddEnchantmentDuration(item,slot,duration);
|
||||
AddEnchantmentDuration(item, slot, duration);
|
||||
}
|
||||
else
|
||||
{
|
||||
// duration == 0 will remove EnchantDuration
|
||||
AddEnchantmentDuration(item,slot,0);
|
||||
AddEnchantmentDuration(item, slot, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Player::SendEnchantmentDurations()
|
||||
{
|
||||
for(EnchantDurationList::iterator itr = m_enchantDuration.begin();itr != m_enchantDuration.end();++itr)
|
||||
for(EnchantDurationList::const_iterator itr = m_enchantDuration.begin(); itr != m_enchantDuration.end(); ++itr)
|
||||
{
|
||||
GetSession()->SendItemEnchantTimeUpdate(GetGUID(), itr->item->GetGUID(),itr->slot,uint32(itr->leftduration)/1000);
|
||||
GetSession()->SendItemEnchantTimeUpdate(GetGUID(), itr->item->GetGUID(), itr->slot, uint32(itr->leftduration) / 1000);
|
||||
}
|
||||
}
|
||||
|
||||
void Player::SendItemDurations()
|
||||
{
|
||||
for(ItemDurationList::iterator itr = m_itemDuration.begin();itr != m_itemDuration.end();++itr)
|
||||
for(ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end(); ++itr)
|
||||
{
|
||||
(*itr)->SendTimeUpdate(this);
|
||||
}
|
||||
@@ -12179,18 +12170,18 @@ void Player::SendNewItem(Item *item, uint32 count, bool received, bool created,
|
||||
|
||||
// last check 2.0.10
|
||||
WorldPacket data( SMSG_ITEM_PUSH_RESULT, (8+4+4+4+1+4+4+4+4+4) );
|
||||
data << GetGUID(); // player GUID
|
||||
data << uint64(GetGUID()); // player GUID
|
||||
data << uint32(received); // 0=looted, 1=from npc
|
||||
data << uint32(created); // 0=received, 1=created
|
||||
data << uint32(1); // always 0x01 (probably meant to be count of listed items)
|
||||
data << (uint8)item->GetBagSlot(); // bagslot
|
||||
data << uint8(item->GetBagSlot()); // bagslot
|
||||
// item slot, but when added to stack: 0xFFFFFFFF
|
||||
data << (uint32) ((item->GetCount()==count) ? item->GetSlot() : -1);
|
||||
data << uint32((item->GetCount() == count) ? item->GetSlot() : -1);
|
||||
data << uint32(item->GetEntry()); // item id
|
||||
data << uint32(item->GetItemSuffixFactor()); // SuffixFactor
|
||||
data << uint32(item->GetItemRandomPropertyId()); // random item property id
|
||||
data << uint32(count); // count of items
|
||||
data << GetItemCount(item->GetEntry()); // count of items in inventory
|
||||
data << uint32(GetItemCount(item->GetEntry())); // count of items in inventory
|
||||
|
||||
if (broadcast && GetGroup())
|
||||
GetGroup()->BroadcastPacket(&data, true);
|
||||
@@ -12209,7 +12200,7 @@ void Player::PrepareQuestMenu( uint64 guid )
|
||||
QuestRelations* pObjectQIR;
|
||||
|
||||
// pets also can have quests
|
||||
Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
|
||||
Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this, guid);
|
||||
if( pCreature )
|
||||
{
|
||||
pObject = (Object*)pCreature;
|
||||
@@ -12275,10 +12266,11 @@ void Player::SendPreparedQuest( uint64 guid )
|
||||
// Auto open -- maybe also should verify there is no greeting
|
||||
uint32 quest_id = qmi0.m_qId;
|
||||
Quest const* pQuest = objmgr.GetQuestTemplate(quest_id);
|
||||
|
||||
if ( pQuest )
|
||||
{
|
||||
if( status == DIALOG_STATUS_REWARD_REP && !GetQuestRewardStatus( quest_id ) )
|
||||
PlayerTalkClass->SendQuestGiverRequestItems( pQuest, guid, CanRewardQuest(pQuest,false), true );
|
||||
PlayerTalkClass->SendQuestGiverRequestItems( pQuest, guid, CanRewardQuest(pQuest, false), true );
|
||||
else if( status == DIALOG_STATUS_INCOMPLETE )
|
||||
PlayerTalkClass->SendQuestGiverRequestItems( pQuest, guid, false, true );
|
||||
// Send completable on repeatable quest if player don't have quest
|
||||
@@ -14219,7 +14211,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
||||
|
||||
if(!LoadValues( fields[2].GetString()))
|
||||
{
|
||||
sLog.outError("Player #%d have broken data in `data` field. Can't be loaded.",GUID_LOPART(guid));
|
||||
sLog.outError("Player #%d have broken data in `data` field. Can't be loaded.", GUID_LOPART(guid));
|
||||
delete result;
|
||||
return false;
|
||||
}
|
||||
@@ -14230,8 +14222,8 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
||||
// cleanup inventory related item value fields (its will be filled correctly in _LoadInventory)
|
||||
for(uint8 slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
|
||||
{
|
||||
SetUInt64Value( (uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2) ), 0 );
|
||||
SetVisibleItemSlot(slot,NULL);
|
||||
SetUInt64Value( PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), 0 );
|
||||
SetVisibleItemSlot(slot, NULL);
|
||||
|
||||
if (m_items[slot])
|
||||
{
|
||||
@@ -14645,7 +14637,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
||||
if(uint32 curTitle = GetUInt32Value(PLAYER_CHOSEN_TITLE))
|
||||
{
|
||||
if(!HasTitle(curTitle))
|
||||
SetUInt32Value(PLAYER_CHOSEN_TITLE,0);
|
||||
SetUInt32Value(PLAYER_CHOSEN_TITLE, 0);
|
||||
}
|
||||
|
||||
// Not finish taxi flight path
|
||||
@@ -15271,18 +15263,18 @@ void Player::_LoadQuestStatus(QueryResult *result)
|
||||
|
||||
// add to quest log
|
||||
if( slot < MAX_QUEST_LOG_SIZE &&
|
||||
( questStatusData.m_status==QUEST_STATUS_INCOMPLETE ||
|
||||
questStatusData.m_status==QUEST_STATUS_COMPLETE &&
|
||||
( questStatusData.m_status == QUEST_STATUS_INCOMPLETE ||
|
||||
questStatusData.m_status == QUEST_STATUS_COMPLETE &&
|
||||
(!questStatusData.m_rewarded || pQuest->IsDaily()) ) )
|
||||
{
|
||||
SetQuestSlot(slot,quest_id,quest_time);
|
||||
SetQuestSlot(slot, quest_id, quest_time);
|
||||
|
||||
if(questStatusData.m_status == QUEST_STATUS_COMPLETE)
|
||||
SetQuestSlotState(slot,QUEST_STATE_COMPLETE);
|
||||
SetQuestSlotState(slot, QUEST_STATE_COMPLETE);
|
||||
|
||||
for(uint8 idx = 0; idx < QUEST_OBJECTIVES_COUNT; ++idx)
|
||||
if(questStatusData.m_creatureOrGOcount[idx])
|
||||
SetQuestSlotCounter(slot,idx,questStatusData.m_creatureOrGOcount[idx]);
|
||||
SetQuestSlotCounter(slot, idx, questStatusData.m_creatureOrGOcount[idx]);
|
||||
|
||||
++slot;
|
||||
}
|
||||
@@ -15300,7 +15292,7 @@ void Player::_LoadQuestStatus(QueryResult *result)
|
||||
}
|
||||
|
||||
if(pQuest->GetBonusTalents())
|
||||
m_questRewardTalentCount+=pQuest->GetBonusTalents();
|
||||
m_questRewardTalentCount += pQuest->GetBonusTalents();
|
||||
}
|
||||
|
||||
sLog.outDebug("Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.m_status, quest_id, GetGUIDLow());
|
||||
@@ -15313,7 +15305,7 @@ void Player::_LoadQuestStatus(QueryResult *result)
|
||||
|
||||
// clear quest log tail
|
||||
for ( uint16 i = slot; i < MAX_QUEST_LOG_SIZE; ++i )
|
||||
SetQuestSlot(i,0);
|
||||
SetQuestSlot(i, 0);
|
||||
}
|
||||
|
||||
void Player::_LoadDailyQuestStatus(QueryResult *result)
|
||||
@@ -15548,7 +15540,7 @@ void Player::SendRaidInfo()
|
||||
}
|
||||
}
|
||||
}
|
||||
data.put<uint32>(p_counter,counter);
|
||||
data.put<uint32>(p_counter, counter);
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
@@ -16791,7 +16783,7 @@ void Player::PetSpellInitialize()
|
||||
|
||||
CharmInfo *charmInfo = pet->GetCharmInfo();
|
||||
|
||||
WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+10*4);
|
||||
WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+1);
|
||||
data << uint64(pet->GetGUID());
|
||||
data << uint32(pet->GetCreatureInfo()->family); // creature family (required for pet talents)
|
||||
data << uint32(0);
|
||||
@@ -16866,22 +16858,16 @@ void Player::PossessSpellInitialize()
|
||||
return;
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_PET_SPELLS, 20+40+1+1);
|
||||
|
||||
//basic info 20
|
||||
WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+1);
|
||||
data << uint64(charm->GetGUID());
|
||||
data << uint32(0x00000000);
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
|
||||
//action bar 40
|
||||
charmInfo->BuildActionBar(&data); //40
|
||||
charmInfo->BuildActionBar(&data);
|
||||
|
||||
//addlist 1
|
||||
data << uint8(0);
|
||||
|
||||
//cooldown 1
|
||||
data << uint8(0);
|
||||
data << uint8(0); // spells count
|
||||
data << uint8(0); // cooldowns count
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
@@ -16952,23 +16938,20 @@ void Player::CharmSpellInitialize()
|
||||
}
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_PET_SPELLS, 20+40+1+4*addlist+1);// first line + actionbar + spellcount + spells + last adds
|
||||
|
||||
//basic info 20
|
||||
WorldPacket data(SMSG_PET_SPELLS, 8+4+4+4+4*10+1+4*addlist+1);
|
||||
data << uint64(charm->GetGUID());
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
|
||||
if(charm->GetTypeId() != TYPEID_PLAYER)
|
||||
data << uint8(((Creature*)charm)->GetReactState()) << uint8(charmInfo->GetCommandState());
|
||||
else
|
||||
data << uint8(0) << uint8(0);
|
||||
data << uint16(0);
|
||||
data << uint8(0) << uint8(0) << uint16(0);
|
||||
|
||||
//action bar 40
|
||||
charmInfo->BuildActionBar(&data); //40
|
||||
charmInfo->BuildActionBar(&data);
|
||||
|
||||
data << uint8(addlist);
|
||||
|
||||
//add list
|
||||
data << uint8(addlist); //1
|
||||
if(addlist)
|
||||
{
|
||||
for(uint32 i = 0; i < MAX_SPELL_CHARM; ++i)
|
||||
@@ -16982,9 +16965,7 @@ void Player::CharmSpellInitialize()
|
||||
}
|
||||
}
|
||||
|
||||
//cooldown
|
||||
uint8 count = 0;
|
||||
data << uint8(count); // cooldowns count
|
||||
data << uint8(0); // cooldowns count
|
||||
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
@@ -17436,8 +17417,8 @@ void Player::ProhibitSpellScholl(SpellSchoolMask idSchoolMask, uint32 unTimeMs )
|
||||
|
||||
if((idSchoolMask & GetSpellSchoolMask(spellInfo)) && GetSpellCooldownDelay(unSpellId) < unTimeMs )
|
||||
{
|
||||
data << unSpellId;
|
||||
data << unTimeMs; // in m.secs
|
||||
data << uint32(unSpellId);
|
||||
data << uint32(unTimeMs); // in m.secs
|
||||
AddSpellCooldown(unSpellId, 0, curTime + unTimeMs/IN_MILISECONDS);
|
||||
}
|
||||
}
|
||||
@@ -19982,16 +19963,16 @@ bool Player::HasTitle(uint32 bitIndex)
|
||||
if (bitIndex > 128)
|
||||
return false;
|
||||
|
||||
uint32 fieldIndexOffset = bitIndex/32;
|
||||
uint32 flag = 1 << (bitIndex%32);
|
||||
return HasFlag(PLAYER__FIELD_KNOWN_TITLES+fieldIndexOffset, flag);
|
||||
uint32 fieldIndexOffset = bitIndex / 32;
|
||||
uint32 flag = 1 << (bitIndex % 32);
|
||||
return HasFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
}
|
||||
|
||||
void Player::SetTitle(CharTitlesEntry const* title)
|
||||
{
|
||||
uint32 fieldIndexOffset = title->bit_index/32;
|
||||
uint32 flag = 1 << (title->bit_index%32);
|
||||
SetFlag(PLAYER__FIELD_KNOWN_TITLES+fieldIndexOffset, flag);
|
||||
uint32 fieldIndexOffset = title->bit_index / 32;
|
||||
uint32 flag = 1 << (title->bit_index % 32);
|
||||
SetFlag(PLAYER__FIELD_KNOWN_TITLES + fieldIndexOffset, flag);
|
||||
}
|
||||
|
||||
/*-----------------------TRINITY--------------------------*/
|
||||
|
||||
+24
-5
@@ -148,6 +148,7 @@ struct ActionButton
|
||||
enum ActionButtonType
|
||||
{
|
||||
ACTION_BUTTON_SPELL = 0,
|
||||
ACTION_BUTTON_EQSET = 32,
|
||||
ACTION_BUTTON_MACRO = 64,
|
||||
ACTION_BUTTON_CMACRO= 65,
|
||||
ACTION_BUTTON_ITEM = 128
|
||||
@@ -289,14 +290,32 @@ struct EnchantDuration
|
||||
typedef std::list<EnchantDuration> EnchantDurationList;
|
||||
typedef std::list<Item*> ItemDurationList;
|
||||
|
||||
enum LfgType
|
||||
{
|
||||
LFG_TYPE_NONE = 0,
|
||||
LFG_TYPE_DUNGEON = 1,
|
||||
LFG_TYPE_RAID = 2,
|
||||
LFG_TYPE_QUEST = 3,
|
||||
LFG_TYPE_ZONE = 4,
|
||||
LFG_TYPE_HEROIC_DUNGEON = 5
|
||||
};
|
||||
|
||||
enum LfgRoles
|
||||
{
|
||||
LEADER = 1,
|
||||
TANK = 2,
|
||||
HEALER = 4,
|
||||
DAMAGE = 8
|
||||
};
|
||||
|
||||
struct LookingForGroupSlot
|
||||
{
|
||||
LookingForGroupSlot() : entry(0), type(0) {}
|
||||
bool Empty() const { return !entry && !type; }
|
||||
void Clear() { entry = 0; type = 0; }
|
||||
void Set(uint32 _entry, uint32 _type ) { entry = _entry; type = _type; }
|
||||
bool Is(uint32 _entry, uint32 _type) const { return entry==_entry && type==_type; }
|
||||
bool canAutoJoin() const { return entry && (type == 1 || type == 5); }
|
||||
bool Is(uint32 _entry, uint32 _type) const { return entry == _entry && type == _type; }
|
||||
bool canAutoJoin() const { return entry && (type == LFG_TYPE_DUNGEON || type == LFG_TYPE_HEROIC_DUNGEON); }
|
||||
|
||||
uint32 entry;
|
||||
uint32 type;
|
||||
@@ -307,11 +326,11 @@ struct LookingForGroupSlot
|
||||
struct LookingForGroup
|
||||
{
|
||||
LookingForGroup() {}
|
||||
bool HaveInSlot(LookingForGroupSlot const& slot) const { return HaveInSlot(slot.entry,slot.type); }
|
||||
bool HaveInSlot(LookingForGroupSlot const& slot) const { return HaveInSlot(slot.entry, slot.type); }
|
||||
bool HaveInSlot(uint32 _entry, uint32 _type) const
|
||||
{
|
||||
for(int i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
|
||||
if(slots[i].Is(_entry,_type))
|
||||
if(slots[i].Is(_entry, _type))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@@ -1363,7 +1382,7 @@ class TRINITY_DLL_SPEC Player : public Unit
|
||||
uint32 GetGlyph(uint8 slot) { return GetUInt32Value(PLAYER_FIELD_GLYPHS_1 + slot); }
|
||||
|
||||
uint32 GetFreePrimaryProffesionPoints() const { return GetUInt32Value(PLAYER_CHARACTER_POINTS2); }
|
||||
void SetFreePrimaryProffesions(uint16 profs) { SetUInt32Value(PLAYER_CHARACTER_POINTS2,profs); }
|
||||
void SetFreePrimaryProffesions(uint16 profs) { SetUInt32Value(PLAYER_CHARACTER_POINTS2, profs); }
|
||||
void InitPrimaryProffesions();
|
||||
|
||||
PlayerSpellMap const& GetSpellMap() const { return m_spells; }
|
||||
|
||||
+16
-17
@@ -181,10 +181,10 @@ void WorldSession::HandleCreatureQueryOpcode( WorldPacket & recv_data )
|
||||
data << uint8(0) << uint8(0) << uint8(0); // name2, name3, name4, always empty
|
||||
data << SubName;
|
||||
data << ci->IconName; // "Directions" for guard, string for Icons 2.3.0
|
||||
data << uint32(ci->type_flags); // flags wdbFeild7=wad flags1
|
||||
data << uint32(ci->type);
|
||||
data << uint32(ci->family); // family wdbFeild9
|
||||
data << uint32(ci->rank); // rank wdbFeild10
|
||||
data << uint32(ci->type_flags); // flags
|
||||
data << uint32(ci->type); // CreatureType.dbc
|
||||
data << uint32(ci->family); // CreatureFamily.dbc
|
||||
data << uint32(ci->rank); // Creature Rank (elite, boss, etc)
|
||||
data << uint32(ci->PetSpellDataId); // Id from CreatureSpellData.dbc wdbField12
|
||||
data << (uint32)ci->Modelid_A1; // Modelid_A1
|
||||
data << (uint32)ci->Modelid_A2; // Modelid_A2
|
||||
@@ -193,7 +193,7 @@ void WorldSession::HandleCreatureQueryOpcode( WorldPacket & recv_data )
|
||||
data << float(ci->unk17); // unk
|
||||
data << uint8(ci->RacialLeader);
|
||||
SendPacket( &data );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE " );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE" );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -205,7 +205,7 @@ void WorldSession::HandleCreatureQueryOpcode( WorldPacket & recv_data )
|
||||
WorldPacket data( SMSG_CREATURE_QUERY_RESPONSE, 4 );
|
||||
data << uint32(entry | 0x80000000);
|
||||
SendPacket( &data );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE " );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,6 @@ void WorldSession::HandleGameObjectQueryOpcode( WorldPacket & recv_data )
|
||||
const GameObjectInfo *info = objmgr.GetGameObjectInfo(entryID);
|
||||
if(info)
|
||||
{
|
||||
|
||||
std::string Name;
|
||||
std::string IconName;
|
||||
std::string CastBarCaption;
|
||||
@@ -254,7 +253,7 @@ void WorldSession::HandleGameObjectQueryOpcode( WorldPacket & recv_data )
|
||||
data.append(info->raw.data, 24);
|
||||
data << float(info->size); // go size
|
||||
SendPacket( &data );
|
||||
sLog.outDebug( "WORLD: Sent CMSG_GAMEOBJECT_QUERY " );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE" );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -267,7 +266,7 @@ void WorldSession::HandleGameObjectQueryOpcode( WorldPacket & recv_data )
|
||||
WorldPacket data ( SMSG_GAMEOBJECT_QUERY_RESPONSE, 4 );
|
||||
data << uint32(entryID | 0x80000000);
|
||||
SendPacket( &data );
|
||||
sLog.outDebug( "WORLD: Sent CMSG_GAMEOBJECT_QUERY " );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE" );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,7 +318,7 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
|
||||
|
||||
void WorldSession::HandleNpcTextQueryOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,4+8);
|
||||
CHECK_PACKET_SIZE(recv_data, 4 + 8);
|
||||
|
||||
uint32 textID;
|
||||
uint64 guid;
|
||||
@@ -354,7 +353,7 @@ void WorldSession::HandleNpcTextQueryOpcode( WorldPacket & recv_data )
|
||||
else
|
||||
{
|
||||
std::string Text_0[8], Text_1[8];
|
||||
for (int i=0;i<8;++i)
|
||||
for (int i = 0; i < 8; ++i)
|
||||
{
|
||||
Text_0[i]=pGossip->Options[i].Text_0;
|
||||
Text_1[i]=pGossip->Options[i].Text_1;
|
||||
@@ -366,7 +365,7 @@ void WorldSession::HandleNpcTextQueryOpcode( WorldPacket & recv_data )
|
||||
NpcTextLocale const *nl = objmgr.GetNpcTextLocale(textID);
|
||||
if (nl)
|
||||
{
|
||||
for (int i=0;i<8;++i)
|
||||
for (int i = 0; i < 8; ++i)
|
||||
{
|
||||
if (nl->Text_0[i].size() > loc_idx && !nl->Text_0[i][loc_idx].empty())
|
||||
Text_0[i]=nl->Text_0[i][loc_idx];
|
||||
@@ -376,7 +375,7 @@ void WorldSession::HandleNpcTextQueryOpcode( WorldPacket & recv_data )
|
||||
}
|
||||
}
|
||||
|
||||
for (int i=0; i<8; ++i)
|
||||
for (int i = 0; i < 8; ++i)
|
||||
{
|
||||
data << pGossip->Options[i].Probability;
|
||||
|
||||
@@ -402,12 +401,12 @@ void WorldSession::HandleNpcTextQueryOpcode( WorldPacket & recv_data )
|
||||
|
||||
SendPacket( &data );
|
||||
|
||||
sLog.outDebug( "WORLD: Sent SMSG_NPC_TEXT_UPDATE " );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_NPC_TEXT_UPDATE" );
|
||||
}
|
||||
|
||||
void WorldSession::HandlePageQueryOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandlePageTextQueryOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,4);
|
||||
CHECK_PACKET_SIZE(recv_data, 4);
|
||||
|
||||
uint32 pageID;
|
||||
|
||||
@@ -448,7 +447,7 @@ void WorldSession::HandlePageQueryOpcode( WorldPacket & recv_data )
|
||||
}
|
||||
SendPacket( &data );
|
||||
|
||||
sLog.outDebug( "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE " );
|
||||
sLog.outDebug( "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -114,7 +114,7 @@ void WorldSession::HandleQuestgiverHelloOpcode( WorldPacket & recv_data )
|
||||
|
||||
void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8+4);
|
||||
CHECK_PACKET_SIZE(recv_data, 8+4);
|
||||
|
||||
uint64 guid;
|
||||
uint32 quest;
|
||||
@@ -123,7 +123,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
||||
if(!GetPlayer()->isAlive())
|
||||
return;
|
||||
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest );
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u", uint32(GUID_LOPART(guid)), quest );
|
||||
|
||||
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM|TYPEMASK_PLAYER);
|
||||
|
||||
@@ -208,14 +208,14 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
|
||||
_player->PlayerTalkClass->CloseGossip();
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestgiverQuestQueryOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleQuestgiverQueryQuestOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8+4);
|
||||
CHECK_PACKET_SIZE(recv_data, 8+4);
|
||||
|
||||
uint64 guid;
|
||||
uint32 quest;
|
||||
recv_data >> guid >> quest;
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest );
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u", uint32(GUID_LOPART(guid)), quest );
|
||||
|
||||
// Verify that the guid is valid and is a questgiver or involved in the requested quest
|
||||
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM);
|
||||
@@ -389,7 +389,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u",quest );
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestComplete(WorldPacket& recv_data)
|
||||
void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8+4);
|
||||
|
||||
@@ -423,12 +423,12 @@ void WorldSession::HandleQuestComplete(WorldPacket& recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestAutoLaunch(WorldPacket& /*recvPacket*/)
|
||||
void WorldSession::HandleQuestgiverQuestAutoLaunch(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH (Send your log to anakin if you see this message)" );
|
||||
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH" );
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestPushToParty(WorldPacket& recvPacket)
|
||||
void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recvPacket,4);
|
||||
|
||||
@@ -604,7 +604,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
|
||||
return result;
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestgiverStatusQueryMultipleOpcode(WorldPacket& /*recvPacket*/)
|
||||
void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog.outDebug("WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY");
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ void WorldSession::HandleLearnTalentOpcode( WorldPacket & recv_data )
|
||||
_player->LearnTalent(talent_id, requested_rank);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTalentWipeOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleTalentWipeConfirmOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8);
|
||||
|
||||
@@ -49,7 +49,7 @@ void WorldSession::HandleTalentWipeOpcode( WorldPacket & recv_data )
|
||||
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TRAINER);
|
||||
if (!unit)
|
||||
{
|
||||
sLog.outDebug( "WORLD: HandleTalentWipeOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
|
||||
sLog.outDebug( "WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+141
-139
@@ -49,7 +49,7 @@
|
||||
#include "Util.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
#define SPELL_CHANNEL_UPDATE_INTERVAL (1*IN_MILISECONDS)
|
||||
#define SPELL_CHANNEL_UPDATE_INTERVAL (1 * IN_MILISECONDS)
|
||||
|
||||
extern pEffect SpellEffects[TOTAL_SPELL_EFFECTS];
|
||||
|
||||
@@ -212,11 +212,11 @@ void SpellCastTargets::Update(Unit* caster)
|
||||
{
|
||||
m_GOTarget = m_GOTargetGUID ? caster->GetMap()->GetGameObject(m_GOTargetGUID) : NULL;
|
||||
m_unitTarget = m_unitTargetGUID ?
|
||||
( m_unitTargetGUID==caster->GetGUID() ? caster : ObjectAccessor::GetUnit(*caster, m_unitTargetGUID) ) :
|
||||
( m_unitTargetGUID == caster->GetGUID() ? caster : ObjectAccessor::GetUnit(*caster, m_unitTargetGUID) ) :
|
||||
NULL;
|
||||
|
||||
m_itemTarget = NULL;
|
||||
if(caster->GetTypeId()==TYPEID_PLAYER)
|
||||
if(caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if(m_targetMask & TARGET_FLAG_ITEM)
|
||||
m_itemTarget = ((Player*)caster)->GetItemByGuid(m_itemTargetGUID);
|
||||
@@ -234,7 +234,7 @@ void SpellCastTargets::Update(Unit* caster)
|
||||
|
||||
bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
|
||||
{
|
||||
if(data->rpos()+4 > data->size())
|
||||
if(data->rpos() + 4 > data->size())
|
||||
return false;
|
||||
|
||||
//data->hexlike();
|
||||
@@ -264,7 +264,7 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
|
||||
|
||||
if( m_targetMask & TARGET_FLAG_SOURCE_LOCATION )
|
||||
{
|
||||
if(data->rpos()+4+4+4 > data->size())
|
||||
if(data->rpos() + 4 + 4 + 4 > data->size())
|
||||
return false;
|
||||
|
||||
*data >> m_srcX >> m_srcY >> m_srcZ;
|
||||
@@ -274,7 +274,7 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
|
||||
|
||||
if( m_targetMask & TARGET_FLAG_DEST_LOCATION )
|
||||
{
|
||||
if(data->rpos()+1+4+4+4 > data->size())
|
||||
if(data->rpos() + 1 + 4 + 4 + 4 > data->size())
|
||||
return false;
|
||||
|
||||
if(!data->readPackGUID(m_unitTargetGUID))
|
||||
@@ -287,7 +287,7 @@ bool SpellCastTargets::read ( WorldPacket * data, Unit *caster )
|
||||
|
||||
if( m_targetMask & TARGET_FLAG_STRING )
|
||||
{
|
||||
if(data->rpos()+1 > data->size())
|
||||
if(data->rpos() + 1 > data->size())
|
||||
return false;
|
||||
|
||||
*data >> m_strTarget;
|
||||
@@ -395,7 +395,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
|
||||
if(m_attackType == RANGED_ATTACK)
|
||||
{
|
||||
// wand case
|
||||
if((m_caster->getClassMask() & CLASSMASK_WAND_USERS) != 0 && m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||
if((m_caster->getClassMask() & CLASSMASK_WAND_USERS) != 0 && m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if(Item* pItem = ((Player*)m_caster)->GetWeaponForAttack(RANGED_ATTACK))
|
||||
m_spellSchoolMask = SpellSchoolMask(1 << pItem->GetProto()->Damage[0].DamageType);
|
||||
@@ -409,11 +409,11 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
|
||||
else
|
||||
m_originalCasterGUID = m_caster->GetGUID();
|
||||
|
||||
if(m_originalCasterGUID==m_caster->GetGUID())
|
||||
if(m_originalCasterGUID == m_caster->GetGUID())
|
||||
m_originalCaster = m_caster;
|
||||
else
|
||||
{
|
||||
m_originalCaster = ObjectAccessor::GetUnit(*m_caster,m_originalCasterGUID);
|
||||
m_originalCaster = ObjectAccessor::GetUnit(*m_caster, m_originalCasterGUID);
|
||||
if(m_originalCaster && !m_originalCaster->IsInWorld()) m_originalCaster = NULL;
|
||||
}
|
||||
|
||||
@@ -453,12 +453,12 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
|
||||
|
||||
if(m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MAGIC && !(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED))
|
||||
{
|
||||
for(int j=0;j<3;j++)
|
||||
for(int j = 0;j < 3; ++j)
|
||||
{
|
||||
if (m_spellInfo->Effect[j]==0)
|
||||
if (m_spellInfo->Effect[j] == 0)
|
||||
continue;
|
||||
|
||||
if(!IsPositiveTarget(m_spellInfo->EffectImplicitTargetA[j],m_spellInfo->EffectImplicitTargetB[j]))
|
||||
if(!IsPositiveTarget(m_spellInfo->EffectImplicitTargetA[j], m_spellInfo->EffectImplicitTargetB[j]))
|
||||
m_canReflect = true;
|
||||
else
|
||||
m_canReflect = (m_spellInfo->AttributesEx & SPELL_ATTR_EX_NEGATIVE) ? true : false;
|
||||
@@ -586,8 +586,8 @@ void Spell::FillTargetMap()
|
||||
else
|
||||
{
|
||||
// clear cooldown at fail
|
||||
if(m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||
((Player*)m_caster)->RemoveSpellCooldown(m_spellInfo->Id,true);
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)m_caster)->RemoveSpellCooldown(m_spellInfo->Id, true);
|
||||
SendCastResult(SPELL_FAILED_NO_EDIBLE_CORPSES);
|
||||
finish(false);
|
||||
}
|
||||
@@ -631,7 +631,7 @@ void Spell::FillTargetMap()
|
||||
AddUnitTarget(m_targets.getUnitTarget(), i);
|
||||
if(m_targets.getCorpseTargetGUID())
|
||||
{
|
||||
Corpse *corpse = ObjectAccessor::GetCorpse(*m_caster,m_targets.getCorpseTargetGUID());
|
||||
Corpse *corpse = ObjectAccessor::GetCorpse(*m_caster, m_targets.getCorpseTargetGUID());
|
||||
if(corpse)
|
||||
{
|
||||
Player* owner = ObjectAccessor::FindPlayer(corpse->GetOwnerGUID());
|
||||
@@ -813,7 +813,7 @@ void Spell::CleanupTargetList()
|
||||
|
||||
void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
|
||||
{
|
||||
if( m_spellInfo->Effect[effIndex]==0 )
|
||||
if( m_spellInfo->Effect[effIndex] == 0 )
|
||||
return;
|
||||
|
||||
if(!CheckTarget(pVictim, effIndex))
|
||||
@@ -825,12 +825,12 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
|
||||
uint64 targetGUID = pVictim->GetGUID();
|
||||
|
||||
// Lookup target in already in list
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
|
||||
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if (targetGUID == ihit->targetGUID) // Found in list
|
||||
{
|
||||
if (!immuned)
|
||||
ihit->effectMask |= 1<<effIndex; // Add only effect mask if not immuned
|
||||
ihit->effectMask |= 1 << effIndex; // Add only effect mask if not immuned
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -840,7 +840,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
|
||||
// Get spell hit result on target
|
||||
TargetInfo target;
|
||||
target.targetGUID = targetGUID; // Store target GUID
|
||||
target.effectMask = immuned ? 0 : 1<<effIndex; // Store index of effect if not immuned
|
||||
target.effectMask = immuned ? 0 : 1 << effIndex; // Store index of effect if not immuned
|
||||
target.processed = false; // Effects not apply on target
|
||||
target.alive = pVictim->isAlive();
|
||||
target.damage = 0;
|
||||
@@ -866,14 +866,14 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
|
||||
target.timeDelay = (uint64) floor(dist / m_spellInfo->speed * 1000.0f);
|
||||
|
||||
// Calculate minimum incoming time
|
||||
if (m_delayMoment==0 || m_delayMoment>target.timeDelay)
|
||||
if (m_delayMoment == 0 || m_delayMoment>target.timeDelay)
|
||||
m_delayMoment = target.timeDelay;
|
||||
}
|
||||
else
|
||||
target.timeDelay = 0LL;
|
||||
|
||||
// If target reflect spell back to caster
|
||||
if (target.missCondition==SPELL_MISS_REFLECT)
|
||||
if (target.missCondition == SPELL_MISS_REFLECT)
|
||||
{
|
||||
// Calculate reflected spell result on caster
|
||||
target.reflectResult = m_caster->SpellHitResult(m_caster, m_spellInfo, m_canReflect);
|
||||
@@ -882,7 +882,7 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
|
||||
target.reflectResult = SPELL_MISS_PARRY;
|
||||
|
||||
// Increase time interval for reflected spells by 1.5
|
||||
target.timeDelay+=target.timeDelay>>1;
|
||||
target.timeDelay += target.timeDelay >> 1;
|
||||
}
|
||||
else
|
||||
target.reflectResult = SPELL_MISS_NONE;
|
||||
@@ -893,24 +893,24 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
|
||||
|
||||
void Spell::AddUnitTarget(uint64 unitGUID, uint32 effIndex)
|
||||
{
|
||||
Unit* unit = m_caster->GetGUID()==unitGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, unitGUID);
|
||||
Unit* unit = m_caster->GetGUID() == unitGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, unitGUID);
|
||||
if (unit)
|
||||
AddUnitTarget(unit, effIndex);
|
||||
}
|
||||
|
||||
void Spell::AddGOTarget(GameObject* pVictim, uint32 effIndex)
|
||||
{
|
||||
if( m_spellInfo->Effect[effIndex]==0 )
|
||||
if( m_spellInfo->Effect[effIndex] == 0 )
|
||||
return;
|
||||
|
||||
uint64 targetGUID = pVictim->GetGUID();
|
||||
|
||||
// Lookup target in already in list
|
||||
for(std::list<GOTargetInfo>::iterator ihit= m_UniqueGOTargetInfo.begin();ihit != m_UniqueGOTargetInfo.end();++ihit)
|
||||
for(std::list<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if (targetGUID == ihit->targetGUID) // Found in list
|
||||
{
|
||||
ihit->effectMask |= 1<<effIndex; // Add only effect mask
|
||||
ihit->effectMask |= 1 << effIndex; // Add only effect mask
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -919,7 +919,7 @@ void Spell::AddGOTarget(GameObject* pVictim, uint32 effIndex)
|
||||
|
||||
GOTargetInfo target;
|
||||
target.targetGUID = targetGUID;
|
||||
target.effectMask = 1<<effIndex;
|
||||
target.effectMask = 1 << effIndex;
|
||||
target.processed = false; // Effects not apply on target
|
||||
|
||||
// Spell have speed - need calculate incoming time
|
||||
@@ -948,11 +948,11 @@ void Spell::AddGOTarget(uint64 goGUID, uint32 effIndex)
|
||||
|
||||
void Spell::AddItemTarget(Item* pitem, uint32 effIndex)
|
||||
{
|
||||
if( m_spellInfo->Effect[effIndex]==0 )
|
||||
if( m_spellInfo->Effect[effIndex] == 0 )
|
||||
return;
|
||||
|
||||
// Lookup target in already in list
|
||||
for(std::list<ItemTargetInfo>::iterator ihit= m_UniqueItemInfo.begin();ihit != m_UniqueItemInfo.end();++ihit)
|
||||
for(std::list<ItemTargetInfo>::iterator ihit = m_UniqueItemInfo.begin(); ihit != m_UniqueItemInfo.end(); ++ihit)
|
||||
{
|
||||
if (pitem == ihit->item) // Found in list
|
||||
{
|
||||
@@ -965,7 +965,7 @@ void Spell::AddItemTarget(Item* pitem, uint32 effIndex)
|
||||
|
||||
ItemTargetInfo target;
|
||||
target.item = pitem;
|
||||
target.effectMask = 1<<effIndex;
|
||||
target.effectMask = 1 << effIndex;
|
||||
m_UniqueItemInfo.push_back(target);
|
||||
}
|
||||
|
||||
@@ -1178,7 +1178,7 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
||||
if( !m_caster->IsFriendlyTo(unit) )
|
||||
{
|
||||
// for delayed spells ignore not visible explicit target
|
||||
if(m_spellInfo->speed > 0.0f && unit==m_targets.getUnitTarget() && !unit->isVisibleForOrDetect(m_caster,false))
|
||||
if(m_spellInfo->speed > 0.0f && unit == m_targets.getUnitTarget() && !unit->isVisibleForOrDetect(m_caster,false))
|
||||
{
|
||||
return SPELL_MISS_EVADE;
|
||||
}
|
||||
@@ -1376,9 +1376,9 @@ void Spell::DoAllEffectOnTarget(GOTargetInfo *target)
|
||||
if(!go)
|
||||
return;
|
||||
|
||||
for(uint32 effectNumber=0;effectNumber<3;effectNumber++)
|
||||
if (effectMask & (1<<effectNumber))
|
||||
HandleEffects(NULL,NULL,go,effectNumber);
|
||||
for(uint32 effectNumber = 0; effectNumber < 3; ++effectNumber)
|
||||
if (effectMask & (1 << effectNumber))
|
||||
HandleEffects(NULL, NULL, go, effectNumber);
|
||||
|
||||
// cast at creature (or GO) quest objectives update at successful cast finished (+channel finished)
|
||||
// ignore autorepeat/melee casts for speed (not exist quest for spells (hm... )
|
||||
@@ -1395,8 +1395,8 @@ void Spell::DoAllEffectOnTarget(ItemTargetInfo *target)
|
||||
if(!target->item || !effectMask)
|
||||
return;
|
||||
|
||||
for(uint32 effectNumber=0;effectNumber<3;effectNumber++)
|
||||
if (effectMask & (1<<effectNumber))
|
||||
for(uint32 effectNumber = 0; effectNumber < 3; ++effectNumber)
|
||||
if (effectMask & (1 << effectNumber))
|
||||
HandleEffects(NULL, target->item, NULL, effectNumber);
|
||||
}
|
||||
|
||||
@@ -1414,11 +1414,11 @@ bool Spell::UpdateChanneledTargetList()
|
||||
|
||||
needAuraMask &= needAliveTargetMask;
|
||||
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if( ihit->missCondition == SPELL_MISS_NONE && (needAliveTargetMask & ihit->effectMask) )
|
||||
{
|
||||
Unit *unit = m_caster->GetGUID()==ihit->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID);
|
||||
Unit *unit = m_caster->GetGUID() == ihit->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID);
|
||||
|
||||
if (unit && unit->isAlive())
|
||||
{
|
||||
@@ -1446,7 +1446,7 @@ bool Spell::UpdateChanneledTargetList()
|
||||
}
|
||||
|
||||
// is all effects from m_needAliveTargetMask have alive targets
|
||||
return needAliveTargetMask==0;
|
||||
return needAliveTargetMask == 0;
|
||||
}
|
||||
|
||||
// Helper for Chain Healing
|
||||
@@ -2769,15 +2769,15 @@ void Spell::_handle_immediate_phase()
|
||||
HandleThreatSpells(m_spellInfo->Id);
|
||||
|
||||
m_needSpellLog = IsNeedSendToClient();
|
||||
for(uint32 j = 0;j<3;j++)
|
||||
for(uint32 j = 0; j < 3; ++j)
|
||||
{
|
||||
if(m_spellInfo->Effect[j]==0)
|
||||
if(m_spellInfo->Effect[j] == 0)
|
||||
continue;
|
||||
|
||||
// apply Send Event effect to ground in case empty target lists
|
||||
if( m_spellInfo->Effect[j] == SPELL_EFFECT_SEND_EVENT && !HaveTargetsForEffect(j) )
|
||||
{
|
||||
HandleEffects(NULL,NULL,NULL, j);
|
||||
HandleEffects(NULL, NULL, NULL, j);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2927,20 +2927,20 @@ void Spell::update(uint32 difftime)
|
||||
{
|
||||
if ( Player* p = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself() )
|
||||
{
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
|
||||
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
TargetInfo* target = &*ihit;
|
||||
if(!IS_CREATURE_GUID(target->targetGUID))
|
||||
continue;
|
||||
|
||||
Unit* unit = m_caster->GetGUID()==target->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster,target->targetGUID);
|
||||
if (unit==NULL)
|
||||
Unit* unit = m_caster->GetGUID() == target->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, target->targetGUID);
|
||||
if (unit == NULL)
|
||||
continue;
|
||||
|
||||
p->CastedCreatureOrGO(unit->GetEntry(),unit->GetGUID(),m_spellInfo->Id);
|
||||
p->CastedCreatureOrGO(unit->GetEntry(), unit->GetGUID(), m_spellInfo->Id);
|
||||
}
|
||||
|
||||
for(std::list<GOTargetInfo>::iterator ihit= m_UniqueGOTargetInfo.begin();ihit != m_UniqueGOTargetInfo.end();++ihit)
|
||||
for(std::list<GOTargetInfo>::iterator ihit = m_UniqueGOTargetInfo.begin(); ihit != m_UniqueGOTargetInfo.end(); ++ihit)
|
||||
{
|
||||
GOTargetInfo* target = &*ihit;
|
||||
|
||||
@@ -2948,7 +2948,7 @@ void Spell::update(uint32 difftime)
|
||||
if(!go)
|
||||
continue;
|
||||
|
||||
p->CastedCreatureOrGO(go->GetEntry(),go->GetGUID(),m_spellInfo->Id);
|
||||
p->CastedCreatureOrGO(go->GetEntry(), go->GetGUID(), m_spellInfo->Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3301,33 +3301,35 @@ void Spell::WriteSpellGoTargets( WorldPacket * data )
|
||||
// m_needAliveTargetMask req for stop channelig if one target die
|
||||
uint32 hit = m_UniqueGOTargetInfo.size(); // Always hits on GO
|
||||
uint32 miss = 0;
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
|
||||
for(std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if ((*ihit).effectMask == 0) // No effect apply - all immuned add state
|
||||
{
|
||||
// possibly SPELL_MISS_IMMUNE2 for this??
|
||||
ihit->missCondition = SPELL_MISS_IMMUNE2;
|
||||
miss++;
|
||||
++miss;
|
||||
}
|
||||
else if ((*ihit).missCondition == SPELL_MISS_NONE)
|
||||
hit++;
|
||||
++hit;
|
||||
else
|
||||
miss++;
|
||||
++miss;
|
||||
}
|
||||
|
||||
*data << (uint8)hit;
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
|
||||
for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if ((*ihit).missCondition == SPELL_MISS_NONE) // Add only hits
|
||||
{
|
||||
*data << uint64(ihit->targetGUID);
|
||||
m_needAliveTargetMask |=ihit->effectMask;
|
||||
}
|
||||
}
|
||||
|
||||
for(std::list<GOTargetInfo>::iterator ighit= m_UniqueGOTargetInfo.begin();ighit != m_UniqueGOTargetInfo.end();++ighit)
|
||||
for(std::list<GOTargetInfo>::const_iterator ighit = m_UniqueGOTargetInfo.begin(); ighit != m_UniqueGOTargetInfo.end(); ++ighit)
|
||||
*data << uint64(ighit->targetGUID); // Always hits
|
||||
|
||||
*data << (uint8)miss;
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
|
||||
for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if( ihit->missCondition != SPELL_MISS_NONE ) // Add only miss
|
||||
{
|
||||
@@ -3472,8 +3474,8 @@ void Spell::SendChannelUpdate(uint32 time)
|
||||
{
|
||||
if(time == 0)
|
||||
{
|
||||
m_caster->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT,0);
|
||||
m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL,0);
|
||||
m_caster->SetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT, 0);
|
||||
m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, 0);
|
||||
}
|
||||
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
@@ -3493,9 +3495,9 @@ void Spell::SendChannelStart(uint32 duration)
|
||||
// select first not resisted target from target list for _0_ effect
|
||||
if(!m_UniqueTargetInfo.empty())
|
||||
{
|
||||
for(std::list<TargetInfo>::iterator itr= m_UniqueTargetInfo.begin();itr != m_UniqueTargetInfo.end();++itr)
|
||||
for(std::list<TargetInfo>::const_iterator itr = m_UniqueTargetInfo.begin(); itr != m_UniqueTargetInfo.end(); ++itr)
|
||||
{
|
||||
if( (itr->effectMask & (1<<0)) && itr->reflectResult==SPELL_MISS_NONE && itr->targetGUID != m_caster->GetGUID())
|
||||
if( (itr->effectMask & (1 << 0)) && itr->reflectResult == SPELL_MISS_NONE && itr->targetGUID != m_caster->GetGUID())
|
||||
{
|
||||
target = ObjectAccessor::GetUnit(*m_caster, itr->targetGUID);
|
||||
break;
|
||||
@@ -3504,9 +3506,9 @@ void Spell::SendChannelStart(uint32 duration)
|
||||
}
|
||||
else if(!m_UniqueGOTargetInfo.empty())
|
||||
{
|
||||
for(std::list<GOTargetInfo>::iterator itr= m_UniqueGOTargetInfo.begin();itr != m_UniqueGOTargetInfo.end();++itr)
|
||||
for(std::list<GOTargetInfo>::const_iterator itr = m_UniqueGOTargetInfo.begin(); itr != m_UniqueGOTargetInfo.end(); ++itr)
|
||||
{
|
||||
if(itr->effectMask & (1<<0) )
|
||||
if(itr->effectMask & (1 << 0) )
|
||||
{
|
||||
target = m_caster->GetMap()->GetGameObject(itr->targetGUID);
|
||||
break;
|
||||
@@ -3535,16 +3537,16 @@ void Spell::SendResurrectRequest(Player* target)
|
||||
// Both players and NPCs can resurrect using spells - have a look at creature 28487 for example
|
||||
// However, the packet structure differs slightly
|
||||
|
||||
const char* sentName = m_caster->GetTypeId()==TYPEID_PLAYER ?"":m_caster->GetNameForLocaleIdx(target->GetSession()->GetSessionDbLocaleIndex());
|
||||
const char* sentName = m_caster->GetTypeId() == TYPEID_PLAYER ? "" : m_caster->GetNameForLocaleIdx(target->GetSession()->GetSessionDbLocaleIndex());
|
||||
|
||||
WorldPacket data(SMSG_RESURRECT_REQUEST, (8+4+strlen(sentName)+1+1+1));
|
||||
data << uint64(m_caster->GetGUID());
|
||||
data << uint32(strlen(sentName)+1);
|
||||
data << uint32(strlen(sentName) + 1);
|
||||
|
||||
data << sentName;
|
||||
data << uint8(0);
|
||||
|
||||
data << uint8(m_caster->GetTypeId()==TYPEID_PLAYER ?0:1);
|
||||
data << uint8(m_caster->GetTypeId() == TYPEID_PLAYER ? 0 : 1);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
@@ -3553,7 +3555,7 @@ void Spell::SendPlaySpellVisual(uint32 SpellID)
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 12);
|
||||
WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 8 + 4);
|
||||
data << uint64(m_caster->GetGUID());
|
||||
data << uint32(SpellID); // spell visual id?
|
||||
((Player*)m_caster)->GetSession()->SendPacket(&data);
|
||||
@@ -3826,7 +3828,7 @@ void Spell::TakeReagents()
|
||||
if (p_caster->CanNoReagentCast(m_spellInfo))
|
||||
return;
|
||||
|
||||
for(uint32 x=0;x<8;x++)
|
||||
for(uint32 x = 0; x < 8; ++x)
|
||||
{
|
||||
if(m_spellInfo->Reagent[x] <= 0)
|
||||
continue;
|
||||
@@ -3840,7 +3842,7 @@ void Spell::TakeReagents()
|
||||
ItemPrototype const *proto = m_CastItem->GetProto();
|
||||
if( proto && proto->ItemId == itemid )
|
||||
{
|
||||
for(int s=0;s < MAX_ITEM_PROTO_SPELLS; ++s)
|
||||
for(int s = 0; s < MAX_ITEM_PROTO_SPELLS; ++s)
|
||||
{
|
||||
// CastItem will be used up and does not count as reagent
|
||||
int32 charges = m_CastItem->GetSpellCharges(s);
|
||||
@@ -3856,7 +3858,7 @@ void Spell::TakeReagents()
|
||||
}
|
||||
|
||||
// if getItemTarget is also spell reagent
|
||||
if (m_targets.getItemTargetEntry()==itemid)
|
||||
if (m_targets.getItemTargetEntry() == itemid)
|
||||
m_targets.setItemTarget(NULL);
|
||||
|
||||
p_caster->DestroyItemCount(itemid, itemcount, true);
|
||||
@@ -4034,7 +4036,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if(target->getLevel() + 10 < m_spellInfo->spellLevel)
|
||||
return SPELL_FAILED_LOWLEVEL;
|
||||
}
|
||||
else if (m_caster->GetTypeId()==TYPEID_PLAYER) // Target - is player caster
|
||||
else if (m_caster->GetTypeId() == TYPEID_PLAYER) // Target - is player caster
|
||||
{
|
||||
// Additional check for some spells
|
||||
// If 0 spell effect empty - client not send target data (need use selection)
|
||||
@@ -4050,7 +4052,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
|
||||
// check pet presents
|
||||
for(int j=0;j<3;j++)
|
||||
for(int j = 0; j < 3; ++j)
|
||||
{
|
||||
if(m_spellInfo->EffectImplicitTargetA[j] == TARGET_UNIT_PET)
|
||||
{
|
||||
@@ -4072,7 +4074,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
{
|
||||
if(!CheckTargetCreatureType(target))
|
||||
{
|
||||
if(target->GetTypeId()==TYPEID_PLAYER)
|
||||
if(target->GetTypeId() == TYPEID_PLAYER)
|
||||
return SPELL_FAILED_TARGET_IS_PLAYER;
|
||||
else
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
@@ -4081,7 +4083,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
// TODO: this check can be applied and for player to prevent cheating when IsPositiveSpell will return always correct result.
|
||||
// check target for pet/charmed casts (not self targeted), self targeted cast used for area effects and etc
|
||||
if(m_caster != target && m_caster->GetTypeId()==TYPEID_UNIT && m_caster->GetCharmerOrOwnerGUID())
|
||||
if(m_caster != target && m_caster->GetTypeId() == TYPEID_UNIT && m_caster->GetCharmerOrOwnerGUID())
|
||||
{
|
||||
// check correctness positive/negative cast target (pet cast real check and cheating check)
|
||||
if(IsPositiveSpell(m_spellInfo->Id))
|
||||
@@ -4125,7 +4127,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
|
||||
// Spell casted only on battleground
|
||||
if((m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_BATTLEGROUND) && m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||
if((m_spellInfo->AttributesEx3 & SPELL_ATTR_EX3_BATTLEGROUND) && m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if(!((Player*)m_caster)->InBattleGround())
|
||||
return SPELL_FAILED_ONLY_BATTLEGROUNDS;
|
||||
|
||||
@@ -4171,7 +4173,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
/*//ImpliciteTargetA-B = 38, If fact there is 0 Spell with ImpliciteTargetB=38
|
||||
if(m_UniqueTargetInfo.empty()) // skip second CheckCast apply (for delayed spells for example)
|
||||
{
|
||||
for(uint8 j = 0; j < 3; j++)
|
||||
for(uint8 j = 0; j < 3; ++j)
|
||||
{
|
||||
if( m_spellInfo->EffectImplicitTargetA[j] == TARGET_UNIT_NEARBY_ENTRY ||
|
||||
m_spellInfo->EffectImplicitTargetB[j] == TARGET_UNIT_NEARBY_ENTRY && m_spellInfo->EffectImplicitTargetA[j] != TARGET_UNIT_CASTER ||
|
||||
@@ -4218,7 +4220,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
range = go_check.GetLastRange();
|
||||
}
|
||||
}
|
||||
else if( focusObject ) //Focus Object
|
||||
else if( focusObject ) // Focus Object
|
||||
{
|
||||
float frange = m_caster->GetDistance(focusObject);
|
||||
if(range >= frange)
|
||||
@@ -4330,7 +4332,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if(m_caster->IsInWater())
|
||||
return SPELL_FAILED_ONLY_ABOVEWATER;
|
||||
}
|
||||
else if(m_spellInfo->SpellIconID==156) // Holy Shock
|
||||
else if(m_spellInfo->SpellIconID == 156) // Holy Shock
|
||||
{
|
||||
// spell different for friends and enemies
|
||||
// hart version required facing
|
||||
@@ -4418,7 +4420,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
// Can be area effect, Check only for players and not check if target - caster (spell can have multiply drain/burn effects)
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
if(Unit* target = m_targets.getUnitTarget())
|
||||
if(target!=m_caster && target->getPowerType()!=m_spellInfo->EffectMiscValue[i])
|
||||
if(target != m_caster && target->getPowerType() != m_spellInfo->EffectMiscValue[i])
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
break;
|
||||
}
|
||||
@@ -4447,14 +4449,14 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
int32 skillValue = ((Player*)m_caster)->GetSkillValue(skill);
|
||||
int32 TargetLevel = m_targets.getUnitTarget()->getLevel();
|
||||
int32 ReqValue = (skillValue < 100 ? (TargetLevel-10)*10 : TargetLevel*5);
|
||||
int32 ReqValue = (skillValue < 100 ? (TargetLevel-10) * 10 : TargetLevel * 5);
|
||||
if (ReqValue > skillValue)
|
||||
return SPELL_FAILED_LOW_CASTLEVEL;
|
||||
|
||||
// chance for fail at orange skinning attempt
|
||||
if( (m_selfContainer && (*m_selfContainer) == this) &&
|
||||
skillValue < sWorld.GetConfigMaxSkillValue() &&
|
||||
(ReqValue < 0 ? 0 : ReqValue) > irand(skillValue-25, skillValue+37) )
|
||||
(ReqValue < 0 ? 0 : ReqValue) > irand(skillValue - 25, skillValue + 37) )
|
||||
return SPELL_FAILED_TRY_AGAIN;
|
||||
|
||||
break;
|
||||
@@ -4481,17 +4483,17 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
|
||||
// get the lock entry
|
||||
uint32 lockId = 0;
|
||||
if (GameObject* go=m_targets.getGOTarget())
|
||||
if (GameObject* go = m_targets.getGOTarget())
|
||||
lockId = go->GetLockId();
|
||||
else if(Item* itm=m_targets.getItemTarget())
|
||||
else if(Item* itm = m_targets.getItemTarget())
|
||||
lockId = itm->GetProto()->LockID;
|
||||
|
||||
SkillType skillId =SKILL_NONE;
|
||||
SkillType skillId = SKILL_NONE;
|
||||
int32 reqSkillValue = 0;
|
||||
int32 skillValue = 0;
|
||||
|
||||
// check lock compatibility
|
||||
SpellCastResult res = CanOpenLock(i,lockId,skillId,reqSkillValue,skillValue);
|
||||
SpellCastResult res = CanOpenLock(i, lockId, skillId, reqSkillValue, skillValue);
|
||||
if(res != SPELL_CAST_OK)
|
||||
return res;
|
||||
|
||||
@@ -4502,7 +4504,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
bool canFailAtMax = skillId != SKILL_HERBALISM && skillId != SKILL_MINING;
|
||||
|
||||
// chance for failure in orange gather / lockpick (gathering skill can't fail at maxskill)
|
||||
if((canFailAtMax || skillValue < sWorld.GetConfigMaxSkillValue()) && reqSkillValue > irand(skillValue-25, skillValue+37))
|
||||
if((canFailAtMax || skillValue < sWorld.GetConfigMaxSkillValue()) && reqSkillValue > irand(skillValue - 25, skillValue + 37))
|
||||
return SPELL_FAILED_TRY_AGAIN;
|
||||
}
|
||||
break;
|
||||
@@ -4568,13 +4570,13 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
case SPELL_EFFECT_SUMMON_PLAYER:
|
||||
{
|
||||
if(m_caster->GetTypeId()!=TYPEID_PLAYER)
|
||||
if(m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
if(!((Player*)m_caster)->GetSelection())
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
Player* target = objmgr.GetPlayer(((Player*)m_caster)->GetSelection());
|
||||
if( !target || ((Player*)m_caster)==target || !target->IsInSameRaidWith((Player*)m_caster) )
|
||||
if( !target || ((Player*)m_caster) == target || !target->IsInSameRaidWith((Player*)m_caster) )
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
// check if our map is dungeon
|
||||
@@ -4600,7 +4602,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
}
|
||||
case SPELL_EFFECT_STEAL_BENEFICIAL_BUFF:
|
||||
{
|
||||
if (m_targets.getUnitTarget()==m_caster)
|
||||
if (m_targets.getUnitTarget() == m_caster)
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
break;
|
||||
}
|
||||
@@ -4618,7 +4620,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
switch(m_spellInfo->Id)
|
||||
{
|
||||
case 61336:
|
||||
if(m_caster->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_caster)->IsInFeralForm())
|
||||
if(m_caster->GetTypeId() != TYPEID_PLAYER || !((Player*)m_caster)->IsInFeralForm())
|
||||
return SPELL_FAILED_ONLY_SHAPESHIFT;
|
||||
break;
|
||||
case 1515:
|
||||
@@ -4674,11 +4676,11 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if (m_caster->IsInWater())
|
||||
return SPELL_FAILED_ONLY_ABOVEWATER;
|
||||
|
||||
if (m_caster->GetTypeId()==TYPEID_PLAYER && ((Player*)m_caster)->GetTransport())
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && ((Player*)m_caster)->GetTransport())
|
||||
return SPELL_FAILED_NO_MOUNTS_ALLOWED;
|
||||
|
||||
// Ignore map check if spell have AreaId. AreaId already checked and this prevent special mount spells
|
||||
if (m_caster->GetTypeId()==TYPEID_PLAYER && !sMapStore.LookupEntry(m_caster->GetMapId())->IsMountAllowed() && !m_IsTriggeredSpell && !m_spellInfo->AreaGroupId)
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && !sMapStore.LookupEntry(m_caster->GetMapId())->IsMountAllowed() && !m_IsTriggeredSpell && !m_spellInfo->AreaGroupId)
|
||||
return SPELL_FAILED_NO_MOUNTS_ALLOWED;
|
||||
|
||||
ShapeshiftForm form = m_caster->m_form;
|
||||
@@ -4717,10 +4719,10 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if (!m_targets.getUnitTarget())
|
||||
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
|
||||
|
||||
if (m_caster->GetTypeId()!=TYPEID_PLAYER || m_CastItem)
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER || m_CastItem)
|
||||
break;
|
||||
|
||||
if(m_targets.getUnitTarget()->getPowerType()!=POWER_MANA)
|
||||
if(m_targets.getUnitTarget()->getPowerType() != POWER_MANA)
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
break;
|
||||
@@ -4786,18 +4788,18 @@ SpellCastResult Spell::CheckCasterAuras() const
|
||||
// Flag drop spells totally immuned to caster auras
|
||||
// FIXME: find more nice check for all totally immuned spells
|
||||
// AttributesEx3 & 0x10000000?
|
||||
if(m_spellInfo->Id==23336 || m_spellInfo->Id==23334 || m_spellInfo->Id==34991)
|
||||
if(m_spellInfo->Id == 23336 || m_spellInfo->Id == 23334 || m_spellInfo->Id == 34991)
|
||||
return SPELL_CAST_OK;
|
||||
|
||||
uint8 school_immune = 0;
|
||||
uint32 mechanic_immune = 0;
|
||||
uint32 dispel_immune = 0;
|
||||
|
||||
//Check if the spell grants school or mechanic immunity.
|
||||
//We use bitmasks so the loop is done only once and not on every aura check below.
|
||||
// Check if the spell grants school or mechanic immunity.
|
||||
// We use bitmasks so the loop is done only once and not on every aura check below.
|
||||
if ( m_spellInfo->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY )
|
||||
{
|
||||
for(int i = 0;i < 3; i ++)
|
||||
for(int i = 0; i < 3; ++i)
|
||||
{
|
||||
if(m_spellInfo->EffectApplyAuraName[i] == SPELL_AURA_SCHOOL_IMMUNITY)
|
||||
school_immune |= uint32(m_spellInfo->EffectMiscValue[i]);
|
||||
@@ -4811,7 +4813,7 @@ SpellCastResult Spell::CheckCasterAuras() const
|
||||
mechanic_immune = IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
|
||||
}
|
||||
|
||||
//Check whether the cast should be prevented by any state you might have.
|
||||
// Check whether the cast should be prevented by any state you might have.
|
||||
SpellCastResult prevented_reason = SPELL_CAST_OK;
|
||||
// Have to check if there is a stun aura. Otherwise will have problems with ghost aura apply while logging out
|
||||
uint32 unitflag = m_caster->GetUInt32Value(UNIT_FIELD_FLAGS); // Get unit state
|
||||
@@ -4821,9 +4823,9 @@ SpellCastResult Spell::CheckCasterAuras() const
|
||||
prevented_reason = SPELL_FAILED_CONFUSED;
|
||||
else if(unitflag & UNIT_FLAG_FLEEING && !(m_spellInfo->AttributesEx5 & SPELL_ATTR_EX5_USABLE_WHILE_FEARED))
|
||||
prevented_reason = SPELL_FAILED_FLEEING;
|
||||
else if(unitflag & UNIT_FLAG_SILENCED && m_spellInfo->PreventionType==SPELL_PREVENTION_TYPE_SILENCE)
|
||||
else if(unitflag & UNIT_FLAG_SILENCED && m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE)
|
||||
prevented_reason = SPELL_FAILED_SILENCED;
|
||||
else if(unitflag & UNIT_FLAG_PACIFIED && m_spellInfo->PreventionType==SPELL_PREVENTION_TYPE_PACIFY)
|
||||
else if(unitflag & UNIT_FLAG_PACIFIED && m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_PACIFY)
|
||||
prevented_reason = SPELL_FAILED_PACIFIED;
|
||||
|
||||
// Attr must make flag drop spell totally immune from all effects
|
||||
@@ -4878,7 +4880,7 @@ SpellCastResult Spell::CheckCasterAuras() const
|
||||
}
|
||||
}
|
||||
}
|
||||
//You are prevented from casting and the spell casted does not grant immunity. Return a failed error.
|
||||
// You are prevented from casting and the spell casted does not grant immunity. Return a failed error.
|
||||
else
|
||||
return prevented_reason;
|
||||
}
|
||||
@@ -4889,7 +4891,7 @@ bool Spell::CanAutoCast(Unit* target)
|
||||
{
|
||||
uint64 targetguid = target->GetGUID();
|
||||
|
||||
for(uint32 j = 0;j<3;j++)
|
||||
for(uint32 j = 0; j < 3; ++j)
|
||||
{
|
||||
if(m_spellInfo->Effect[j] == SPELL_EFFECT_APPLY_AURA)
|
||||
{
|
||||
@@ -4975,9 +4977,9 @@ SpellCastResult Spell::CheckRange(bool strict)
|
||||
|
||||
if(m_targets.m_targetMask == TARGET_FLAG_DEST_LOCATION && m_targets.m_destX != 0 && m_targets.m_destY != 0 && m_targets.m_destZ != 0)
|
||||
{
|
||||
if(!m_caster->IsWithinDist3d(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ,max_range))
|
||||
if(!m_caster->IsWithinDist3d(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, max_range))
|
||||
return SPELL_FAILED_OUT_OF_RANGE;
|
||||
if(m_caster->IsWithinDist3d(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ,min_range))
|
||||
if(m_caster->IsWithinDist3d(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, min_range))
|
||||
return SPELL_FAILED_TOO_CLOSE;
|
||||
}
|
||||
|
||||
@@ -5099,16 +5101,16 @@ SpellCastResult Spell::CheckItems()
|
||||
else
|
||||
{
|
||||
uint32 itemid = m_CastItem->GetEntry();
|
||||
if( !p_caster->HasItemCount(itemid,1) )
|
||||
if( !p_caster->HasItemCount(itemid, 1) )
|
||||
return SPELL_FAILED_ITEM_NOT_READY;
|
||||
|
||||
ItemPrototype const *proto = m_CastItem->GetProto();
|
||||
if(!proto)
|
||||
return SPELL_FAILED_ITEM_NOT_READY;
|
||||
|
||||
for (int i = 0; i<5; i++)
|
||||
for (int i = 0; i < 5; ++i)
|
||||
if (proto->Spells[i].SpellCharges)
|
||||
if(m_CastItem->GetSpellCharges(i)==0)
|
||||
if(m_CastItem->GetSpellCharges(i) == 0)
|
||||
return SPELL_FAILED_NO_CHARGES_REMAIN;
|
||||
|
||||
// consumable cast item checks
|
||||
@@ -5191,7 +5193,7 @@ SpellCastResult Spell::CheckItems()
|
||||
|
||||
GameObject* ok = NULL;
|
||||
MaNGOS::GameObjectFocusCheck go_check(m_caster,m_spellInfo->RequiresSpellFocus);
|
||||
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectFocusCheck> checker(m_caster,ok,go_check);
|
||||
MaNGOS::GameObjectSearcher<MaNGOS::GameObjectFocusCheck> checker(m_caster, ok, go_check);
|
||||
|
||||
TypeContainerVisitor<Trinity::GameObjectSearcher<Trinity::GameObjectFocusCheck>, GridTypeMapContainer > object_checker(checker);
|
||||
CellLock<GridReadGuard> cell_lock(cell, p);
|
||||
@@ -5241,7 +5243,7 @@ SpellCastResult Spell::CheckItems()
|
||||
|
||||
// check totem-item requirements (items presence in inventory)
|
||||
uint32 totems = 2;
|
||||
for(int i=0;i<2;++i)
|
||||
for(int i = 0; i < 2 ; ++i)
|
||||
{
|
||||
if(m_spellInfo->Totem[i] != 0)
|
||||
{
|
||||
@@ -5258,7 +5260,7 @@ SpellCastResult Spell::CheckItems()
|
||||
|
||||
// Check items for TotemCategory (items presence in inventory)
|
||||
uint32 TotemCategory = 2;
|
||||
for(int i=0;i<2;++i)
|
||||
for(int i= 0; i < 2; ++i)
|
||||
{
|
||||
if(m_spellInfo->TotemCategory[i] != 0)
|
||||
{
|
||||
@@ -5470,11 +5472,11 @@ SpellCastResult Spell::CheckItems()
|
||||
{
|
||||
case ITEM_SUBCLASS_WEAPON_BOW:
|
||||
case ITEM_SUBCLASS_WEAPON_CROSSBOW:
|
||||
if(ammoProto->SubClass!=ITEM_SUBCLASS_ARROW)
|
||||
if(ammoProto->SubClass != ITEM_SUBCLASS_ARROW)
|
||||
return SPELL_FAILED_NO_AMMO;
|
||||
break;
|
||||
case ITEM_SUBCLASS_WEAPON_GUN:
|
||||
if(ammoProto->SubClass!=ITEM_SUBCLASS_BULLET)
|
||||
if(ammoProto->SubClass != ITEM_SUBCLASS_BULLET)
|
||||
return SPELL_FAILED_NO_AMMO;
|
||||
break;
|
||||
default:
|
||||
@@ -5485,6 +5487,7 @@ SpellCastResult Spell::CheckItems()
|
||||
return SPELL_FAILED_NO_AMMO;
|
||||
}; break;
|
||||
case ITEM_SUBCLASS_WEAPON_WAND:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -5547,7 +5550,7 @@ void Spell::Delayed() // only called in DealDamage()
|
||||
//check pushback reduce
|
||||
int32 delaytime = 500; // spellcasting delay is normally 500ms
|
||||
int32 delayReduce = 100; // must be initialized to 100 for percent modifiers
|
||||
((Player*)m_caster)->ApplySpellMod(m_spellInfo->Id,SPELLMOD_NOT_LOSE_CASTING_TIME, delayReduce, this);
|
||||
((Player*)m_caster)->ApplySpellMod(m_spellInfo->Id, SPELLMOD_NOT_LOSE_CASTING_TIME, delayReduce, this);
|
||||
delayReduce += m_caster->GetTotalAuraModifier(SPELL_AURA_REDUCE_PUSHBACK) - 100;
|
||||
if(delayReduce >= 100)
|
||||
return;
|
||||
@@ -5562,13 +5565,13 @@ void Spell::Delayed() // only called in DealDamage()
|
||||
else
|
||||
m_timer += delaytime;
|
||||
|
||||
sLog.outDetail("Spell %u partially interrupted for (%d) ms at damage",m_spellInfo->Id,delaytime);
|
||||
sLog.outDetail("Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime);
|
||||
|
||||
WorldPacket data(SMSG_SPELL_DELAYED, 8+4);
|
||||
data.append(m_caster->GetPackGUID());
|
||||
data << uint32(delaytime);
|
||||
|
||||
m_caster->SendMessageToSet(&data,true);
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void Spell::DelayedChannel()
|
||||
@@ -5582,7 +5585,7 @@ void Spell::DelayedChannel()
|
||||
//check pushback reduce
|
||||
int32 delaytime = GetSpellDuration(m_spellInfo) * 25 / 100; // channeling delay is normally 25% of its time per hit
|
||||
int32 delayReduce = 100; // must be initialized to 100 for percent modifiers
|
||||
((Player*)m_caster)->ApplySpellMod(m_spellInfo->Id,SPELLMOD_NOT_LOSE_CASTING_TIME,delayReduce, this);
|
||||
((Player*)m_caster)->ApplySpellMod(m_spellInfo->Id, SPELLMOD_NOT_LOSE_CASTING_TIME, delayReduce, this);
|
||||
delayReduce += m_caster->GetTotalAuraModifier(SPELL_AURA_REDUCE_PUSHBACK) - 100;
|
||||
if(delayReduce >= 100)
|
||||
return;
|
||||
@@ -5599,11 +5602,11 @@ void Spell::DelayedChannel()
|
||||
|
||||
sLog.outDebug("Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer);
|
||||
|
||||
for(std::list<TargetInfo>::iterator ihit= m_UniqueTargetInfo.begin();ihit != m_UniqueTargetInfo.end();++ihit)
|
||||
for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
{
|
||||
if ((*ihit).missCondition == SPELL_MISS_NONE)
|
||||
{
|
||||
Unit* unit = m_caster->GetGUID()==ihit->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID);
|
||||
Unit* unit = m_caster->GetGUID() == ihit->targetGUID ? m_caster : ObjectAccessor::GetUnit(*m_caster, ihit->targetGUID);
|
||||
if (unit)
|
||||
{
|
||||
unit->DelayAura(m_spellInfo->Id, m_caster->GetGUID(), delaytime);
|
||||
@@ -5611,7 +5614,7 @@ void Spell::DelayedChannel()
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = 0; j < 3; j++)
|
||||
for(int j = 0; j < 3; ++j)
|
||||
{
|
||||
// partially interrupt persistent area auras
|
||||
DynamicObject* dynObj = m_caster->GetDynObject(m_spellInfo->Id, j);
|
||||
@@ -5680,7 +5683,7 @@ CurrentSpellTypes Spell::GetCurrentContainer()
|
||||
bool Spell::CheckTarget(Unit* target, uint32 eff)
|
||||
{
|
||||
// Check targets for creature type mask and remove not appropriate (skip explicit self target case, maybe need other explicit targets)
|
||||
if(m_spellInfo->EffectImplicitTargetA[eff]!=TARGET_UNIT_CASTER)
|
||||
if(m_spellInfo->EffectImplicitTargetA[eff] != TARGET_UNIT_CASTER)
|
||||
{
|
||||
if (!CheckTargetCreatureType(target))
|
||||
return false;
|
||||
@@ -5709,9 +5712,9 @@ bool Spell::CheckTarget(Unit* target, uint32 eff)
|
||||
}
|
||||
|
||||
//Check player targets and remove if in GM mode or GM invisibility (for not self casting case)
|
||||
if( target != m_caster && target->GetTypeId()==TYPEID_PLAYER)
|
||||
if( target != m_caster && target->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if(((Player*)target)->GetVisibility()==VISIBILITY_OFF)
|
||||
if(((Player*)target)->GetVisibility() == VISIBILITY_OFF)
|
||||
return false;
|
||||
|
||||
if(((Player*)target)->isGameMaster() && !IsPositiveSpell(m_spellInfo->Id))
|
||||
@@ -5728,21 +5731,21 @@ bool Spell::CheckTarget(Unit* target, uint32 eff)
|
||||
case SPELL_EFFECT_SUMMON_PLAYER: // from anywhere
|
||||
break;
|
||||
case SPELL_EFFECT_DUMMY:
|
||||
if(m_spellInfo->Id!=20577) // Cannibalize
|
||||
if(m_spellInfo->Id != 20577) // Cannibalize
|
||||
break;
|
||||
//fall through
|
||||
case SPELL_EFFECT_RESURRECT_NEW:
|
||||
// player far away, maybe his corpse near?
|
||||
if(target!=m_caster && !target->IsWithinLOSInMap(m_caster))
|
||||
if(target != m_caster && !target->IsWithinLOSInMap(m_caster))
|
||||
{
|
||||
if(!m_targets.getCorpseTargetGUID())
|
||||
return false;
|
||||
|
||||
Corpse *corpse = ObjectAccessor::GetCorpse(*m_caster,m_targets.getCorpseTargetGUID());
|
||||
Corpse *corpse = ObjectAccessor::GetCorpse(*m_caster, m_targets.getCorpseTargetGUID());
|
||||
if(!corpse)
|
||||
return false;
|
||||
|
||||
if(target->GetGUID()!=corpse->GetOwnerGUID())
|
||||
if(target->GetGUID() != corpse->GetOwnerGUID())
|
||||
return false;
|
||||
|
||||
if(!corpse->IsWithinLOSInMap(m_caster))
|
||||
@@ -5758,7 +5761,7 @@ bool Spell::CheckTarget(Unit* target, uint32 eff)
|
||||
caster = m_caster->GetMap()->GetGameObject(m_originalCasterGUID);
|
||||
if (!caster)
|
||||
caster = m_caster;
|
||||
if(target!=m_caster && !target->IsWithinLOSInMap(caster))
|
||||
if(target != m_caster && !target->IsWithinLOSInMap(caster))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
@@ -5774,16 +5777,16 @@ bool Spell::IsNeedSendToClient() const
|
||||
|
||||
bool Spell::HaveTargetsForEffect( uint8 effect ) const
|
||||
{
|
||||
for(std::list<TargetInfo>::const_iterator itr= m_UniqueTargetInfo.begin();itr != m_UniqueTargetInfo.end();++itr)
|
||||
if(itr->effectMask & (1<<effect))
|
||||
for(std::list<TargetInfo>::const_iterator itr = m_UniqueTargetInfo.begin(); itr != m_UniqueTargetInfo.end(); ++itr)
|
||||
if(itr->effectMask & (1 << effect))
|
||||
return true;
|
||||
|
||||
for(std::list<GOTargetInfo>::const_iterator itr= m_UniqueGOTargetInfo.begin();itr != m_UniqueGOTargetInfo.end();++itr)
|
||||
if(itr->effectMask & (1<<effect))
|
||||
for(std::list<GOTargetInfo>::const_iterator itr = m_UniqueGOTargetInfo.begin(); itr != m_UniqueGOTargetInfo.end(); ++itr)
|
||||
if(itr->effectMask & (1 << effect))
|
||||
return true;
|
||||
|
||||
for(std::list<ItemTargetInfo>::const_iterator itr= m_UniqueItemInfo.begin();itr != m_UniqueItemInfo.end();++itr)
|
||||
if(itr->effectMask & (1<<effect))
|
||||
for(std::list<ItemTargetInfo>::const_iterator itr = m_UniqueItemInfo.begin(); itr != m_UniqueItemInfo.end(); ++itr)
|
||||
if(itr->effectMask & (1 << effect))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -5806,7 +5809,7 @@ SpellEvent::~SpellEvent()
|
||||
else
|
||||
{
|
||||
sLog.outError("~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.",
|
||||
(m_Spell->GetCaster()->GetTypeId()==TYPEID_PLAYER?"Player":"Creature"), m_Spell->GetCaster()->GetGUIDLow(),m_Spell->m_spellInfo->Id);
|
||||
(m_Spell->GetCaster()->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), m_Spell->GetCaster()->GetGUIDLow(), m_Spell->m_spellInfo->Id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5825,8 +5828,7 @@ bool SpellEvent::Execute(uint64 e_time, uint32 p_time)
|
||||
if (m_Spell->IsDeletable())
|
||||
{
|
||||
// check, if we do have unfinished triggered spells
|
||||
|
||||
return(true); // spell is deletable, finish event
|
||||
return true; // spell is deletable, finish event
|
||||
}
|
||||
// event will be re-added automatically at the end of routine)
|
||||
} break;
|
||||
@@ -5863,7 +5865,7 @@ bool SpellEvent::Execute(uint64 e_time, uint32 p_time)
|
||||
{
|
||||
// re-add us to the queue
|
||||
m_Spell->GetCaster()->m_Events.AddEvent(this, m_Spell->GetDelayStart() + n_offset, false);
|
||||
return(false); // event not complete
|
||||
return false; // event not complete
|
||||
}
|
||||
// event complete
|
||||
// finish update event will be re-added automatically at the end of routine)
|
||||
@@ -5875,7 +5877,7 @@ bool SpellEvent::Execute(uint64 e_time, uint32 p_time)
|
||||
m_Spell->SetDelayStart(e_time);
|
||||
// re-plan the event for the delay moment
|
||||
m_Spell->GetCaster()->m_Events.AddEvent(this, e_time + m_Spell->GetDelayMoment(), false);
|
||||
return(false); // event not complete
|
||||
return false; // event not complete
|
||||
}
|
||||
} break;
|
||||
|
||||
@@ -5888,7 +5890,7 @@ bool SpellEvent::Execute(uint64 e_time, uint32 p_time)
|
||||
|
||||
// spell processing not complete, plan event on the next update interval
|
||||
m_Spell->GetCaster()->m_Events.AddEvent(this, e_time + 1, false);
|
||||
return(false); // event not complete
|
||||
return false; // event not complete
|
||||
}
|
||||
|
||||
void SpellEvent::Abort(uint64 /*e_time*/)
|
||||
|
||||
+10
-49
@@ -5892,18 +5892,8 @@ void AuraEffect::PeriodicTick()
|
||||
|
||||
pCaster->DealDamageMods(m_target,pdamage,&absorb);
|
||||
|
||||
WorldPacket data(SMSG_PERIODICAURALOG, (21+16));// we guess size
|
||||
data.append(m_target->GetPackGUID());
|
||||
data.appendPackGUID(GetCasterGUID());
|
||||
data << uint32(GetId());
|
||||
data << uint32(1);
|
||||
data << uint32(m_auraName);
|
||||
data << (uint32)pdamage;
|
||||
data << uint32(0); // overkill
|
||||
data << (uint32)GetSpellSchoolMask(GetSpellProto()); // will be mask in 2.4.x
|
||||
data << (uint32)absorb;
|
||||
data << (uint32)resist;
|
||||
m_target->SendMessageToSet(&data,true);
|
||||
SpellPeriodicAuraLogInfo pInfo(this, pdamage, 0, absorb, resist, 0.0f);
|
||||
m_target->SendPeriodicAuraLog(&pInfo);
|
||||
|
||||
Unit* target = m_target; // aura can be deleted in DealDamage
|
||||
SpellEntry const* spellProto = GetSpellProto();
|
||||
@@ -6030,15 +6020,8 @@ void AuraEffect::PeriodicTick()
|
||||
|
||||
int32 gain = m_target->ModifyHealth(pdamage);
|
||||
|
||||
WorldPacket data(SMSG_PERIODICAURALOG, (21+16));// we guess size
|
||||
data.append(m_target->GetPackGUID());
|
||||
data.appendPackGUID(GetCasterGUID());
|
||||
data << uint32(GetId());
|
||||
data << uint32(1);
|
||||
data << uint32(m_auraName);
|
||||
data << (uint32)pdamage;
|
||||
data << uint32(pdamage - gain); // wotlk
|
||||
m_target->SendMessageToSet(&data,true);
|
||||
SpellPeriodicAuraLogInfo pInfo(this, pdamage, pdamage - gain, 0, 0, 0.0f);
|
||||
m_target->SendPeriodicAuraLog(&pInfo);
|
||||
|
||||
// add HoTs to amount healed in bgs
|
||||
if( pCaster->GetTypeId() == TYPEID_PLAYER )
|
||||
@@ -6152,16 +6135,8 @@ void AuraEffect::PeriodicTick()
|
||||
modOwner->ApplySpellMod(GetId(), SPELLMOD_MULTIPLE_VALUE, gain_multiplier);
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_PERIODICAURALOG, (21+16));// we guess size
|
||||
data.append(m_target->GetPackGUID());
|
||||
data.appendPackGUID(GetCasterGUID());
|
||||
data << uint32(GetId());
|
||||
data << uint32(1);
|
||||
data << uint32(m_auraName);
|
||||
data << (uint32)power; // power type
|
||||
data << (uint32)drain_amount;
|
||||
data << (float)gain_multiplier;
|
||||
m_target->SendMessageToSet(&data,true);
|
||||
SpellPeriodicAuraLogInfo pInfo(this, drain_amount, 0, 0, 0, gain_multiplier);
|
||||
m_target->SendPeriodicAuraLog(&pInfo);
|
||||
|
||||
int32 gain_amount = int32(drain_amount*gain_multiplier);
|
||||
|
||||
@@ -6215,15 +6190,8 @@ void AuraEffect::PeriodicTick()
|
||||
sLog.outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), amount, GetId());
|
||||
|
||||
WorldPacket data(SMSG_PERIODICAURALOG, (21+16));// we guess size
|
||||
data.append(m_target->GetPackGUID());
|
||||
data.appendPackGUID(GetCasterGUID());
|
||||
data << uint32(GetId());
|
||||
data << uint32(1);
|
||||
data << uint32(m_auraName);
|
||||
data << uint32(power); // power type
|
||||
data << (uint32)amount;
|
||||
m_target->SendMessageToSet(&data,true);
|
||||
SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f);
|
||||
m_target->SendPeriodicAuraLog(&pInfo);
|
||||
|
||||
int32 gain = m_target->ModifyPower(power,amount);
|
||||
|
||||
@@ -6247,15 +6215,8 @@ void AuraEffect::PeriodicTick()
|
||||
|
||||
uint32 amount = m_amount;
|
||||
|
||||
WorldPacket data(SMSG_PERIODICAURALOG, (21+16));// we guess size
|
||||
data.append(m_target->GetPackGUID());
|
||||
data.appendPackGUID(GetCasterGUID());
|
||||
data << uint32(GetId());
|
||||
data << uint32(1);
|
||||
data << uint32(m_auraName);
|
||||
data << (uint32)power; // power type
|
||||
data << (uint32)amount;
|
||||
m_target->SendMessageToSet(&data,true);
|
||||
SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f);
|
||||
m_target->SendPeriodicAuraLog(&pInfo);
|
||||
|
||||
sLog.outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
|
||||
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), amount, GetId());
|
||||
|
||||
+157
-154
@@ -276,14 +276,14 @@ void Spell::EffectInstaKill(uint32 /*i*/)
|
||||
case 1863: spellID=18791; break; //succubus
|
||||
case 17252: spellID=35701; break; //fellguard
|
||||
default:
|
||||
sLog.outError("EffectInstaKill: Unhandled creature entry (%u) case.",entry);
|
||||
sLog.outError("EffectInstaKill: Unhandled creature entry (%u) case.", entry);
|
||||
return;
|
||||
}
|
||||
|
||||
m_caster->CastSpell(m_caster,spellID,true);
|
||||
m_caster->CastSpell(m_caster, spellID, true);
|
||||
}
|
||||
|
||||
if(m_caster==unitTarget) // prevent interrupt message
|
||||
if(m_caster == unitTarget) // prevent interrupt message
|
||||
finish();
|
||||
|
||||
m_caster->DealDamage(unitTarget, unitTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
@@ -299,11 +299,11 @@ void Spell::EffectEnvirinmentalDMG(uint32 i)
|
||||
// currently each enemy selected explicitly and self cast damage, we prevent apply self casted spell bonuses/etc
|
||||
damage = m_spellInfo->CalculateSimpleValue(i);
|
||||
|
||||
m_caster->CalcAbsorbResist(m_caster,GetSpellSchoolMask(m_spellInfo), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist, m_spellInfo);
|
||||
m_caster->CalcAbsorbResist(m_caster, GetSpellSchoolMask(m_spellInfo), SPELL_DIRECT_DAMAGE, damage, &absorb, &resist, m_spellInfo);
|
||||
|
||||
m_caster->SendSpellNonMeleeDamageLog(m_caster, m_spellInfo->Id, damage, GetSpellSchoolMask(m_spellInfo), absorb, resist, false, 0, false);
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
((Player*)m_caster)->EnvironmentalDamage(DAMAGE_FIRE,damage);
|
||||
((Player*)m_caster)->EnvironmentalDamage(DAMAGE_FIRE, damage);
|
||||
}
|
||||
|
||||
void Spell::EffectSchoolDMG(uint32 effect_idx)
|
||||
@@ -783,7 +783,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
case 4: spell_id = 8067; break; // Party Time!
|
||||
case 5: spell_id = 8068; break; // Healthy Spirit
|
||||
}
|
||||
m_caster->CastSpell(m_caster,spell_id,true,NULL);
|
||||
m_caster->CastSpell(m_caster, spell_id, true, NULL);
|
||||
return;
|
||||
}
|
||||
case 8213: // Savory Deviate Delight
|
||||
@@ -805,7 +805,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
case 8593: // Symbol of life (restore creature to life)
|
||||
case 31225: // Shimmering Vessel (restore creature to life)
|
||||
{
|
||||
if(!unitTarget || unitTarget->GetTypeId()!=TYPEID_UNIT)
|
||||
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
((Creature*)unitTarget)->setDeathState(JUST_ALIVED);
|
||||
return;
|
||||
@@ -889,18 +889,18 @@ void Spell::EffectDummy(uint32 i)
|
||||
}
|
||||
case 16589: // Noggenfogger Elixir
|
||||
{
|
||||
if(m_caster->GetTypeId()!=TYPEID_PLAYER)
|
||||
if(m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
uint32 spell_id = 0;
|
||||
switch(urand(1,3))
|
||||
switch(urand(1, 3))
|
||||
{
|
||||
case 1: spell_id = 16595; break;
|
||||
case 2: spell_id = 16593; break;
|
||||
default:spell_id = 16591; break;
|
||||
}
|
||||
|
||||
m_caster->CastSpell(m_caster,spell_id,true,NULL);
|
||||
m_caster->CastSpell(m_caster, spell_id, true, NULL);
|
||||
return;
|
||||
}
|
||||
case 17251: // Spirit Healer Res
|
||||
@@ -911,7 +911,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
if(m_originalCaster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
WorldPacket data(SMSG_SPIRIT_HEALER_CONFIRM, 8);
|
||||
data << unitTarget->GetGUID();
|
||||
data << uint64(unitTarget->GetGUID());
|
||||
((Player*)m_originalCaster)->GetSession()->SendPacket( &data );
|
||||
}
|
||||
return;
|
||||
@@ -923,12 +923,12 @@ void Spell::EffectDummy(uint32 i)
|
||||
|
||||
uint32 spell_id = roll_chance_i(50) ? 17269 : 17270;
|
||||
|
||||
m_caster->CastSpell(m_caster,spell_id,true,NULL);
|
||||
m_caster->CastSpell(m_caster, spell_id, true, NULL);
|
||||
return;
|
||||
}
|
||||
case 20577: // Cannibalize
|
||||
if (unitTarget)
|
||||
m_caster->CastSpell(m_caster,20578,false,NULL);
|
||||
m_caster->CastSpell(m_caster, 20578, false, NULL);
|
||||
return;
|
||||
case 23019: // Crystal Prison Dummy DND
|
||||
{
|
||||
@@ -948,49 +948,49 @@ void Spell::EffectDummy(uint32 i)
|
||||
|
||||
WorldPacket data(SMSG_GAMEOBJECT_SPAWN_ANIM_OBSOLETE, 8);
|
||||
data << uint64(Crystal_Prison->GetGUID());
|
||||
m_caster->SendMessageToSet(&data,true);
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
|
||||
return;
|
||||
}
|
||||
case 23074: // Arcanite Dragonling
|
||||
if (!m_CastItem) return;
|
||||
m_caster->CastSpell(m_caster,19804,true,m_CastItem);
|
||||
m_caster->CastSpell(m_caster, 19804, true, m_CastItem);
|
||||
return;
|
||||
case 23075: // Mithril Mechanical Dragonling
|
||||
if (!m_CastItem) return;
|
||||
m_caster->CastSpell(m_caster,12749,true,m_CastItem);
|
||||
m_caster->CastSpell(m_caster, 12749, true, m_CastItem);
|
||||
return;
|
||||
case 23076: // Mechanical Dragonling
|
||||
if (!m_CastItem) return;
|
||||
m_caster->CastSpell(m_caster,4073,true,m_CastItem);
|
||||
m_caster->CastSpell(m_caster, 4073, true, m_CastItem);
|
||||
return;
|
||||
case 23133: // Gnomish Battle Chicken
|
||||
if (!m_CastItem) return;
|
||||
m_caster->CastSpell(m_caster,13166,true,m_CastItem);
|
||||
m_caster->CastSpell(m_caster, 13166, true, m_CastItem);
|
||||
return;
|
||||
case 23448: // Ultrasafe Transporter: Gadgetzan - backfires
|
||||
{
|
||||
int32 r = irand(0, 119);
|
||||
if ( r < 20 ) // 1/6 polymorph
|
||||
m_caster->CastSpell(m_caster,23444,true);
|
||||
m_caster->CastSpell(m_caster, 23444, true);
|
||||
else if ( r < 100 ) // 4/6 evil twin
|
||||
m_caster->CastSpell(m_caster,23445,true);
|
||||
m_caster->CastSpell(m_caster, 23445, true);
|
||||
else // 1/6 miss the target
|
||||
m_caster->CastSpell(m_caster,36902,true);
|
||||
m_caster->CastSpell(m_caster, 36902, true);
|
||||
return;
|
||||
}
|
||||
case 23453: // Ultrasafe Transporter: Gadgetzan
|
||||
if ( roll_chance_i(50) ) // success
|
||||
m_caster->CastSpell(m_caster,23441,true);
|
||||
m_caster->CastSpell(m_caster, 23441, true);
|
||||
else // failure
|
||||
m_caster->CastSpell(m_caster,23446,true);
|
||||
m_caster->CastSpell(m_caster, 23446, true);
|
||||
return;
|
||||
case 23645: // Hourglass Sand
|
||||
m_caster->RemoveAurasDueToSpell(23170);
|
||||
return;
|
||||
case 23725: // Gift of Life (warrior bwl trinket)
|
||||
m_caster->CastSpell(m_caster,23782,true);
|
||||
m_caster->CastSpell(m_caster,23783,true);
|
||||
m_caster->CastSpell(m_caster, 23782, true);
|
||||
m_caster->CastSpell(m_caster, 23783, true);
|
||||
return;
|
||||
case 25860: // Reindeer Transformation
|
||||
{
|
||||
@@ -1021,7 +1021,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
case 28006: // Arcane Cloaking
|
||||
{
|
||||
if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER )
|
||||
m_caster->CastSpell(unitTarget,29294,true);
|
||||
m_caster->CastSpell(unitTarget, 29294, true);
|
||||
return;
|
||||
}
|
||||
// Polarity Shift
|
||||
@@ -1086,7 +1086,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
case 5: spell_id = 33064; break;
|
||||
}
|
||||
|
||||
m_caster->CastSpell(m_caster,spell_id,true,NULL);
|
||||
m_caster->CastSpell(m_caster, spell_id, true, NULL);
|
||||
return;
|
||||
}
|
||||
case 35745:
|
||||
@@ -1099,7 +1099,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
default: return;
|
||||
}
|
||||
|
||||
m_caster->CastSpell(m_caster,spell_id,true);
|
||||
m_caster->CastSpell(m_caster, spell_id, true);
|
||||
return;
|
||||
}
|
||||
case 37674: // Chaos Blast
|
||||
@@ -1108,14 +1108,14 @@ void Spell::EffectDummy(uint32 i)
|
||||
return;
|
||||
|
||||
int32 basepoints0 = 100;
|
||||
m_caster->CastCustomSpell(unitTarget,37675,&basepoints0,NULL,NULL,true);
|
||||
m_caster->CastCustomSpell(unitTarget, 37675, &basepoints0, NULL, NULL, true);
|
||||
return;
|
||||
}
|
||||
case 40802: // Mingo's Fortune Generator (Mingo's Fortune Giblets)
|
||||
{
|
||||
// selecting one from Bloodstained Fortune item
|
||||
uint32 newitemid;
|
||||
switch(urand(1,20))
|
||||
switch(urand(1, 20))
|
||||
{
|
||||
case 1: newitemid = 32688; break;
|
||||
case 2: newitemid = 32689; break;
|
||||
@@ -1141,7 +1141,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
return;
|
||||
}
|
||||
|
||||
DoCreateItem(i,newitemid);
|
||||
DoCreateItem(i, newitemid);
|
||||
return;
|
||||
}
|
||||
// Demon Broiled Surprise
|
||||
@@ -1167,7 +1167,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
creatureTarget->SetHealth(0); // just for nice GM-mode view
|
||||
|
||||
//cast spell Raptor Capture Credit
|
||||
m_caster->CastSpell(m_caster,42337,true,NULL);
|
||||
m_caster->CastSpell(m_caster, 42337, true, NULL);
|
||||
return;
|
||||
}
|
||||
case 34665: //Administer Antidote
|
||||
@@ -1195,7 +1195,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
return;
|
||||
|
||||
pCreature->SetHealth(health);
|
||||
((Player*)m_caster)->RewardPlayerAndGroupAtEvent(16992,pCreature);
|
||||
((Player*)m_caster)->RewardPlayerAndGroupAtEvent(16992, pCreature);
|
||||
|
||||
if (pCreature->IsAIEnabled)
|
||||
pCreature->AI()->AttackStart(m_caster);
|
||||
@@ -1285,7 +1285,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
case 53341:
|
||||
case 53343:
|
||||
{
|
||||
m_caster->CastSpell(m_caster,54586,true);
|
||||
m_caster->CastSpell(m_caster, 54586, true);
|
||||
return;
|
||||
}
|
||||
case 58418: // Portal to Orgrimmar
|
||||
@@ -1312,7 +1312,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
|
||||
// FIXME: custom spell required this aura state by some unknown reason, we not need remove it anyway
|
||||
m_caster->ModifyAuraState(AURA_STATE_BERSERKING,true);
|
||||
m_caster->CastCustomSpell(m_caster,26635,&hasteModBasePoints0,&hasteModBasePoints1,&hasteModBasePoints2,true,NULL);
|
||||
m_caster->CastCustomSpell(m_caster, 26635, &hasteModBasePoints0, &hasteModBasePoints1, &hasteModBasePoints2, true, NULL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1340,7 +1340,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
(GetSpellSchoolMask(spellInfo) & SPELL_SCHOOL_MASK_FROST) &&
|
||||
spellInfo->Id != 11958 && GetSpellRecoveryTime(spellInfo) > 0 )
|
||||
{
|
||||
((Player*)m_caster)->RemoveSpellCooldown(classspell,true);
|
||||
((Player*)m_caster)->RemoveSpellCooldown(classspell, true);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -1362,7 +1362,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
if(m_spellInfo->SpellFamilyFlags & 0x1 && m_spellInfo->SpellVisual[0] == 867)
|
||||
{
|
||||
int32 chargeBasePoints0 = damage;
|
||||
m_caster->CastCustomSpell(m_caster,34846,&chargeBasePoints0,NULL,NULL,true);
|
||||
m_caster->CastCustomSpell(m_caster, 34846, &chargeBasePoints0, NULL, NULL, true);
|
||||
return;
|
||||
}
|
||||
//Slam
|
||||
@@ -1425,7 +1425,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
{
|
||||
if(!unitTarget)
|
||||
return;
|
||||
m_caster->CastSpell(unitTarget,21887,true); // spell mod
|
||||
m_caster->CastSpell(unitTarget, 21887, true);// spell mod
|
||||
return;
|
||||
}
|
||||
// Last Stand
|
||||
@@ -1602,7 +1602,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
}
|
||||
case 31231: // Cheat Death
|
||||
{
|
||||
m_caster->CastSpell(m_caster,45182,true);
|
||||
m_caster->CastSpell(m_caster, 45182, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1707,7 +1707,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
((Player*)m_caster)->AddSpellMod(mod, false);
|
||||
}
|
||||
else
|
||||
m_caster->CastSpell(unitTarget,spell_proto,true,NULL);
|
||||
m_caster->CastSpell(unitTarget, spell_proto, true, NULL);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -1761,7 +1761,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
default: return; // ignore for not healing classes
|
||||
}
|
||||
|
||||
m_caster->CastSpell(m_caster,spell_id,true);
|
||||
m_caster->CastSpell(m_caster, spell_id, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1780,7 +1780,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
case 8019: spell_id = 36755; break; // Rank 3
|
||||
case 10399: spell_id = 36759; break; // Rank 4
|
||||
default:
|
||||
sLog.outError("Spell::EffectDummy: Spell %u not handled in RW",m_spellInfo->Id);
|
||||
sLog.outError("Spell::EffectDummy: Spell %u not handled in RW", m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1847,7 +1847,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
damage+=dummy->GetAmount();
|
||||
// Regenerate 6% of Total Mana Every 3 secs
|
||||
int32 EffectBasePoints0 = unitTarget->GetMaxPower(POWER_MANA) * damage / 100;
|
||||
m_caster->CastCustomSpell(unitTarget,39609,&EffectBasePoints0,NULL,NULL,true,NULL,NULL,m_originalCasterGUID);
|
||||
m_caster->CastCustomSpell(unitTarget, 39609, &EffectBasePoints0, NULL, NULL, true, NULL, NULL, m_originalCasterGUID);
|
||||
return;
|
||||
}
|
||||
// Lava Lash
|
||||
@@ -1884,12 +1884,12 @@ void Spell::EffectDummy(uint32 i)
|
||||
return;
|
||||
|
||||
int32 bp = damage * 1.5f;
|
||||
m_caster->CastCustomSpell(unitTarget,47633,&bp,NULL,NULL,true);
|
||||
m_caster->CastCustomSpell(unitTarget, 47633, &bp, NULL, NULL, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
int32 bp = damage;
|
||||
m_caster->CastCustomSpell(unitTarget,47632,&bp,NULL,NULL,true);
|
||||
m_caster->CastCustomSpell(unitTarget, 47632, &bp, NULL, NULL, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1993,7 +1993,7 @@ void Spell::EffectForceCast(uint32 i)
|
||||
return;
|
||||
}
|
||||
|
||||
unitTarget->CastSpell(unitTarget,spellInfo,true,NULL,NULL,m_originalCasterGUID);
|
||||
unitTarget->CastSpell(unitTarget, spellInfo, true, NULL, NULL, m_originalCasterGUID);
|
||||
}
|
||||
|
||||
void Spell::EffectTriggerSpell(uint32 i)
|
||||
@@ -2069,7 +2069,7 @@ void Spell::EffectTriggerSpell(uint32 i)
|
||||
return;
|
||||
|
||||
for (int j=0; j < spell->StackAmount; ++j)
|
||||
m_caster->CastSpell(unitTarget,spell->Id, true, m_CastItem, NULL, m_originalCasterGUID);
|
||||
m_caster->CastSpell(unitTarget, spell->Id, true, m_CastItem, NULL, m_originalCasterGUID);
|
||||
return;
|
||||
}
|
||||
// Mercurial Shield - (need add max stack of 26464 Mercurial Shield)
|
||||
@@ -2080,13 +2080,13 @@ void Spell::EffectTriggerSpell(uint32 i)
|
||||
return;
|
||||
|
||||
for (int j=0; j < spell->StackAmount; ++j)
|
||||
m_caster->CastSpell(unitTarget,spell->Id, true, m_CastItem, NULL, m_originalCasterGUID);
|
||||
m_caster->CastSpell(unitTarget, spell->Id, true, m_CastItem, NULL, m_originalCasterGUID);
|
||||
return;
|
||||
}
|
||||
// Righteous Defense
|
||||
case 31980:
|
||||
{
|
||||
m_caster->CastSpell(unitTarget, 31790, true,m_CastItem,NULL,m_originalCasterGUID);
|
||||
m_caster->CastSpell(unitTarget, 31790, true, m_CastItem, NULL, m_originalCasterGUID);
|
||||
return;
|
||||
}
|
||||
// Cloak of Shadows
|
||||
@@ -2264,9 +2264,9 @@ void Spell::EffectTeleportUnits(uint32 i)
|
||||
if ( r >= 70 ) // 7/12 success
|
||||
{
|
||||
if ( r < 100 ) // 4/12 evil twin
|
||||
m_caster->CastSpell(m_caster,23445,true);
|
||||
m_caster->CastSpell(m_caster, 23445, true);
|
||||
else // 1/12 fire
|
||||
m_caster->CastSpell(m_caster,23449,true);
|
||||
m_caster->CastSpell(m_caster, 23449, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -2275,41 +2275,41 @@ void Spell::EffectTeleportUnits(uint32 i)
|
||||
{
|
||||
if ( roll_chance_i(50) ) // 50% success
|
||||
{
|
||||
int32 rand_eff = urand(1,7);
|
||||
int32 rand_eff = urand(1, 7);
|
||||
switch ( rand_eff )
|
||||
{
|
||||
case 1:
|
||||
// soul split - evil
|
||||
m_caster->CastSpell(m_caster,36900,true);
|
||||
m_caster->CastSpell(m_caster, 36900, true);
|
||||
break;
|
||||
case 2:
|
||||
// soul split - good
|
||||
m_caster->CastSpell(m_caster,36901,true);
|
||||
m_caster->CastSpell(m_caster, 36901, true);
|
||||
break;
|
||||
case 3:
|
||||
// Increase the size
|
||||
m_caster->CastSpell(m_caster,36895,true);
|
||||
m_caster->CastSpell(m_caster, 36895, true);
|
||||
break;
|
||||
case 4:
|
||||
// Decrease the size
|
||||
m_caster->CastSpell(m_caster,36893,true);
|
||||
m_caster->CastSpell(m_caster, 36893, true);
|
||||
break;
|
||||
case 5:
|
||||
// Transform
|
||||
{
|
||||
if (((Player*)m_caster)->GetTeam() == ALLIANCE )
|
||||
m_caster->CastSpell(m_caster,36897,true);
|
||||
m_caster->CastSpell(m_caster, 36897, true);
|
||||
else
|
||||
m_caster->CastSpell(m_caster,36899,true);
|
||||
m_caster->CastSpell(m_caster, 36899, true);
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
// chicken
|
||||
m_caster->CastSpell(m_caster,36940,true);
|
||||
m_caster->CastSpell(m_caster, 36940, true);
|
||||
break;
|
||||
case 7:
|
||||
// evil twin
|
||||
m_caster->CastSpell(m_caster,23445,true);
|
||||
m_caster->CastSpell(m_caster, 23445, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2320,28 +2320,28 @@ void Spell::EffectTeleportUnits(uint32 i)
|
||||
{
|
||||
if ( roll_chance_i(50) ) // 50% success
|
||||
{
|
||||
int32 rand_eff = urand(1,4);
|
||||
int32 rand_eff = urand(1, 4);
|
||||
switch ( rand_eff )
|
||||
{
|
||||
case 1:
|
||||
// soul split - evil
|
||||
m_caster->CastSpell(m_caster,36900,true);
|
||||
m_caster->CastSpell(m_caster, 36900, true);
|
||||
break;
|
||||
case 2:
|
||||
// soul split - good
|
||||
m_caster->CastSpell(m_caster,36901,true);
|
||||
m_caster->CastSpell(m_caster, 36901, true);
|
||||
break;
|
||||
case 3:
|
||||
// Increase the size
|
||||
m_caster->CastSpell(m_caster,36895,true);
|
||||
m_caster->CastSpell(m_caster, 36895, true);
|
||||
break;
|
||||
case 4:
|
||||
// Transform
|
||||
{
|
||||
if (((Player*)m_caster)->GetTeam() == ALLIANCE )
|
||||
m_caster->CastSpell(m_caster,36897,true);
|
||||
m_caster->CastSpell(m_caster, 36897, true);
|
||||
else
|
||||
m_caster->CastSpell(m_caster,36899,true);
|
||||
m_caster->CastSpell(m_caster, 36899, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2422,11 +2422,11 @@ void Spell::EffectPowerDrain(uint32 i)
|
||||
if(Player *modOwner = m_caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_MULTIPLE_VALUE, manaMultiplier);
|
||||
|
||||
int32 gain = int32(new_damage*manaMultiplier);
|
||||
int32 gain = int32(new_damage * manaMultiplier);
|
||||
|
||||
m_caster->ModifyPower(POWER_MANA,gain);
|
||||
//send log
|
||||
m_caster->SendEnergizeSpellLog(m_caster, m_spellInfo->Id,gain,POWER_MANA);
|
||||
m_caster->SendEnergizeSpellLog(m_caster, m_spellInfo->Id, gain, POWER_MANA);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2474,7 +2474,7 @@ void Spell::EffectPowerBurn(uint32 i)
|
||||
|
||||
int32 new_damage = (curPower < power) ? curPower : power;
|
||||
|
||||
unitTarget->ModifyPower(powertype,-new_damage);
|
||||
unitTarget->ModifyPower(powertype, -new_damage);
|
||||
float multiplier = m_spellInfo->EffectMultipleValue[i];
|
||||
|
||||
if(Player *modOwner = m_caster->GetSpellModOwner())
|
||||
@@ -2745,7 +2745,7 @@ void Spell::DoCreateItem(uint32 i, uint32 itemtype)
|
||||
|
||||
// set the "Crafted by ..." property of the item
|
||||
if( pItem->GetProto()->Class != ITEM_CLASS_CONSUMABLE && pItem->GetProto()->Class != ITEM_CLASS_QUEST)
|
||||
pItem->SetUInt32Value(ITEM_FIELD_CREATOR,player->GetGUIDLow());
|
||||
pItem->SetUInt32Value(ITEM_FIELD_CREATOR, player->GetGUIDLow());
|
||||
|
||||
// send info to the client
|
||||
if(pItem)
|
||||
@@ -2769,23 +2769,23 @@ void Spell::EffectCreateItem2(uint32 i)
|
||||
|
||||
uint32 item_id = m_spellInfo->EffectItemType[i];
|
||||
if(item_id)
|
||||
DoCreateItem(i,item_id);
|
||||
DoCreateItem(i, item_id);
|
||||
|
||||
// special case: fake item replaced by generate using spell_loot_template
|
||||
if(IsLootCraftingSpell(m_spellInfo))
|
||||
{
|
||||
if(item_id)
|
||||
{
|
||||
if(!player->HasItemCount(item_id,1))
|
||||
if(!player->HasItemCount(item_id, 1))
|
||||
return;
|
||||
|
||||
// remove reagent
|
||||
uint32 count = 1;
|
||||
player->DestroyItemCount (item_id,count,true);
|
||||
player->DestroyItemCount(item_id, count, true);
|
||||
}
|
||||
|
||||
// create some random items
|
||||
player->AutoStoreLoot(m_spellInfo->Id,LootTemplates_Spell);
|
||||
player->AutoStoreLoot(m_spellInfo->Id, LootTemplates_Spell);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3079,7 +3079,7 @@ void Spell::EffectOpenLock(uint32 effIndex)
|
||||
int32 reqSkillValue = 0;
|
||||
int32 skillValue;
|
||||
|
||||
SpellCastResult res = CanOpenLock(effIndex,lockId,skillId,reqSkillValue,skillValue);
|
||||
SpellCastResult res = CanOpenLock(effIndex, lockId, skillId, reqSkillValue, skillValue);
|
||||
if(res != SPELL_CAST_OK)
|
||||
{
|
||||
SendCastResult(res);
|
||||
@@ -3153,7 +3153,7 @@ void Spell::EffectSummonChangeItem(uint32 i)
|
||||
uint8 msg = player->CanStoreItem( m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), dest, pNewItem, true );
|
||||
if( msg == EQUIP_ERR_OK )
|
||||
{
|
||||
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(),true);
|
||||
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), true);
|
||||
|
||||
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
||||
if(m_CastItem==m_targets.getItemTarget())
|
||||
@@ -3171,7 +3171,7 @@ void Spell::EffectSummonChangeItem(uint32 i)
|
||||
uint8 msg = player->CanBankItem( m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), dest, pNewItem, true );
|
||||
if( msg == EQUIP_ERR_OK )
|
||||
{
|
||||
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(),true);
|
||||
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), true);
|
||||
|
||||
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
||||
if(m_CastItem==m_targets.getItemTarget())
|
||||
@@ -3189,7 +3189,7 @@ void Spell::EffectSummonChangeItem(uint32 i)
|
||||
uint8 msg = player->CanEquipItem( m_CastItem->GetSlot(), dest, pNewItem, true );
|
||||
if( msg == EQUIP_ERR_OK )
|
||||
{
|
||||
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(),true);
|
||||
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), true);
|
||||
|
||||
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
||||
if(m_CastItem==m_targets.getItemTarget())
|
||||
@@ -3219,15 +3219,15 @@ void Spell::EffectProficiency(uint32 /*i*/)
|
||||
Player *p_target = (Player*)unitTarget;
|
||||
|
||||
uint32 subClassMask = m_spellInfo->EquippedItemSubClassMask;
|
||||
if(m_spellInfo->EquippedItemClass == 2 && !(p_target->GetWeaponProficiency() & subClassMask))
|
||||
if(m_spellInfo->EquippedItemClass == ITEM_CLASS_WEAPON && !(p_target->GetWeaponProficiency() & subClassMask))
|
||||
{
|
||||
p_target->AddWeaponProficiency(subClassMask);
|
||||
p_target->SendProficiency(uint8(0x02),p_target->GetWeaponProficiency());
|
||||
p_target->SendProficiency(ITEM_CLASS_WEAPON, p_target->GetWeaponProficiency());
|
||||
}
|
||||
if(m_spellInfo->EquippedItemClass == 4 && !(p_target->GetArmorProficiency() & subClassMask))
|
||||
if(m_spellInfo->EquippedItemClass == ITEM_CLASS_ARMOR && !(p_target->GetArmorProficiency() & subClassMask))
|
||||
{
|
||||
p_target->AddArmorProficiency(subClassMask);
|
||||
p_target->SendProficiency(uint8(0x04),p_target->GetArmorProficiency());
|
||||
p_target->SendProficiency(ITEM_CLASS_ARMOR, p_target->GetArmorProficiency());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3568,7 +3568,7 @@ void Spell::EffectDistract(uint32 /*i*/)
|
||||
// Set creature Distracted, Stop it, And turn it
|
||||
unitTarget->SetOrientation(angle);
|
||||
unitTarget->StopMoving();
|
||||
unitTarget->GetMotionMaster()->MoveDistract(damage*IN_MILISECONDS);
|
||||
unitTarget->GetMotionMaster()->MoveDistract(damage * IN_MILISECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3891,26 +3891,26 @@ void Spell::EffectEnchantItemTmp(uint32 i)
|
||||
uint32 duration;
|
||||
|
||||
// rogue family enchantments exception by duration
|
||||
if(m_spellInfo->Id==38615)
|
||||
if(m_spellInfo->Id == 38615)
|
||||
duration = 1800; // 30 mins
|
||||
// other rogue family enchantments always 1 hour (some have spell damage=0, but some have wrong data in EffBasePoints)
|
||||
else if(m_spellInfo->SpellFamilyName==SPELLFAMILY_ROGUE)
|
||||
else if(m_spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE)
|
||||
duration = 3600; // 1 hour
|
||||
// shaman family enchantments
|
||||
else if(m_spellInfo->SpellFamilyName==SPELLFAMILY_SHAMAN)
|
||||
else if(m_spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN)
|
||||
duration = 1800; // 30 mins
|
||||
// other cases with this SpellVisual already selected
|
||||
else if(m_spellInfo->SpellVisual[0]==215)
|
||||
else if(m_spellInfo->SpellVisual[0] == 215)
|
||||
duration = 1800; // 30 mins
|
||||
// some fishing pole bonuses
|
||||
else if(m_spellInfo->SpellVisual[0]==563)
|
||||
else if(m_spellInfo->SpellVisual[0] == 563)
|
||||
duration = 600; // 10 mins
|
||||
// shaman rockbiter enchantments
|
||||
else if(m_spellInfo->SpellVisual[0]==0)
|
||||
else if(m_spellInfo->SpellVisual[0] == 0)
|
||||
duration = 1800; // 30 mins
|
||||
else if(m_spellInfo->Id==29702)
|
||||
else if(m_spellInfo->Id == 29702)
|
||||
duration = 300; // 5 mins
|
||||
else if(m_spellInfo->Id==37360)
|
||||
else if(m_spellInfo->Id == 37360)
|
||||
duration = 300; // 5 mins
|
||||
// default case
|
||||
else
|
||||
@@ -3924,18 +3924,18 @@ void Spell::EffectEnchantItemTmp(uint32 i)
|
||||
if(item_owner!=p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_GM_LOG_TRADE) )
|
||||
{
|
||||
sLog.outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(temp): %s (Entry: %d) for player: %s (Account: %u)",
|
||||
p_caster->GetName(),p_caster->GetSession()->GetAccountId(),
|
||||
itemTarget->GetProto()->Name1,itemTarget->GetEntry(),
|
||||
item_owner->GetName(),item_owner->GetSession()->GetAccountId());
|
||||
p_caster->GetName(), p_caster->GetSession()->GetAccountId(),
|
||||
itemTarget->GetProto()->Name1, itemTarget->GetEntry(),
|
||||
item_owner->GetName(), item_owner->GetSession()->GetAccountId());
|
||||
}
|
||||
|
||||
// remove old enchanting before applying new if equipped
|
||||
item_owner->ApplyEnchantment(itemTarget,TEMP_ENCHANTMENT_SLOT,false);
|
||||
item_owner->ApplyEnchantment(itemTarget,TEMP_ENCHANTMENT_SLOT, false);
|
||||
|
||||
itemTarget->SetEnchantment(TEMP_ENCHANTMENT_SLOT, enchant_id, duration*1000, 0);
|
||||
itemTarget->SetEnchantment(TEMP_ENCHANTMENT_SLOT, enchant_id, duration * 1000, 0);
|
||||
|
||||
// add new enchanting if equipped
|
||||
item_owner->ApplyEnchantment(itemTarget,TEMP_ENCHANTMENT_SLOT,true);
|
||||
item_owner->ApplyEnchantment(itemTarget, TEMP_ENCHANTMENT_SLOT, true);
|
||||
}
|
||||
|
||||
void Spell::EffectTameCreature(uint32 /*i*/)
|
||||
@@ -4130,7 +4130,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
|
||||
// multiple weapon dmg effect workaround
|
||||
// execute only the last weapon damage
|
||||
// and handle all effects at once
|
||||
for (int j = 0; j < 3; j++)
|
||||
for (int j = 0; j < 3; ++j)
|
||||
{
|
||||
switch(m_spellInfo->Effect[j])
|
||||
{
|
||||
@@ -4279,7 +4279,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
|
||||
// Stormstrike AP Buff
|
||||
if ( (*citr)->GetMiscValue() == 5634 )
|
||||
{
|
||||
m_caster->CastSpell(m_caster,38430,true,NULL,*citr);
|
||||
m_caster->CastSpell(m_caster, 38430, true, NULL, *citr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -4306,10 +4306,10 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
|
||||
{
|
||||
case SPELL_EFFECT_WEAPON_DAMAGE:
|
||||
case SPELL_EFFECT_WEAPON_DAMAGE_NOSCHOOL:
|
||||
fixed_bonus += CalculateDamage(j,unitTarget);
|
||||
fixed_bonus += CalculateDamage(j, unitTarget);
|
||||
break;
|
||||
case SPELL_EFFECT_NORMALIZED_WEAPON_DMG:
|
||||
fixed_bonus += CalculateDamage(j,unitTarget);
|
||||
fixed_bonus += CalculateDamage(j, unitTarget);
|
||||
normalized = true;
|
||||
break;
|
||||
case SPELL_EFFECT_WEAPON_PERCENT_DAMAGE:
|
||||
@@ -4437,7 +4437,7 @@ void Spell::EffectSummonObjectWild(uint32 i)
|
||||
if( !target )
|
||||
target = m_caster;
|
||||
|
||||
float x,y,z;
|
||||
float x, y, z;
|
||||
if(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
||||
{
|
||||
x = m_targets.m_destX;
|
||||
@@ -4445,7 +4445,7 @@ void Spell::EffectSummonObjectWild(uint32 i)
|
||||
z = m_targets.m_destZ;
|
||||
}
|
||||
else
|
||||
m_caster->GetClosePoint(x,y,z,DEFAULT_WORLD_OBJECT_SIZE);
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
|
||||
|
||||
Map *map = target->GetMap();
|
||||
|
||||
@@ -4549,7 +4549,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
return;
|
||||
|
||||
uint32 spell_id = 0;
|
||||
switch(urand(1,5))
|
||||
switch(urand(1, 5))
|
||||
{
|
||||
case 1: spell_id = 8854; break;
|
||||
default: spell_id = 8855; break;
|
||||
@@ -4671,14 +4671,17 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
case 29830:
|
||||
{
|
||||
uint32 item = 0;
|
||||
switch ( urand(1,6) )
|
||||
switch ( urand(1, 6) )
|
||||
{
|
||||
case 1:case 2:case 3:
|
||||
item = 23584;break; // Loch Modan Lager
|
||||
case 4:case 5:
|
||||
item = 23585;break; // Stouthammer Lite
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
item = 23584; break; // Loch Modan Lager
|
||||
case 4:
|
||||
case 5:
|
||||
item = 23585; break; // Stouthammer Lite
|
||||
case 6:
|
||||
item = 23586;break; // Aerie Peak Pale Ale
|
||||
item = 23586; break; // Aerie Peak Pale Ale
|
||||
}
|
||||
if (item)
|
||||
DoCreateItem(effIndex,item);
|
||||
@@ -4823,7 +4826,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
return;
|
||||
|
||||
uint32 spellId = 0;
|
||||
switch(rand()%4)
|
||||
switch(rand() % 4)
|
||||
{
|
||||
case 0: spellId = 46740; break;
|
||||
case 1: spellId = 46739; break;
|
||||
@@ -4963,12 +4966,12 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
case 61288: // Minor Inscription Research
|
||||
case 61756: // Northrend Inscription Research (FAST QA VERSION)
|
||||
{
|
||||
if(m_caster->GetTypeId()!=TYPEID_PLAYER)
|
||||
if(m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
// learn random explicit discovery recipe (if any)
|
||||
if(uint32 discoveredSpell = GetExplicitDiscoverySpell(m_spellInfo->Id, (Player*)m_caster))
|
||||
((Player*)m_caster)->learnSpell(discoveredSpell,false);
|
||||
((Player*)m_caster)->learnSpell(discoveredSpell, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -5006,14 +5009,14 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
}
|
||||
|
||||
static uint32 const itypes[8][3] = {
|
||||
{ 5512,19004,19005}, // Minor Healthstone
|
||||
{ 5511,19006,19007}, // Lesser Healthstone
|
||||
{ 5509,19008,19009}, // Healthstone
|
||||
{ 5510,19010,19011}, // Greater Healthstone
|
||||
{ 9421,19012,19013}, // Major Healthstone
|
||||
{22103,22104,22105}, // Master Healthstone
|
||||
{36889,36890,36891}, // Demonic Healthstone
|
||||
{36892,36893,36894} // Fel Healthstone
|
||||
{ 5512, 19004, 19005}, // Minor Healthstone
|
||||
{ 5511, 19006, 19007}, // Lesser Healthstone
|
||||
{ 5509, 19008, 19009}, // Healthstone
|
||||
{ 5510, 19010, 19011}, // Greater Healthstone
|
||||
{ 9421, 19012, 19013}, // Major Healthstone
|
||||
{22103, 22104, 22105}, // Master Healthstone
|
||||
{36889, 36890, 36891}, // Demonic Healthstone
|
||||
{36892, 36893, 36894} // Fel Healthstone
|
||||
};
|
||||
|
||||
switch(m_spellInfo->Id)
|
||||
@@ -5254,8 +5257,8 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
const uint32 spellid = 28703;
|
||||
|
||||
// don't overwrite an existing aura
|
||||
for(uint8 i=0; i<5; i++)
|
||||
if(unitTarget->HasAuraEffect(spellid+i, 0))
|
||||
for(uint8 i = 0; i < 5; ++i)
|
||||
if(unitTarget->HasAuraEffect(spellid + i, 0))
|
||||
return;
|
||||
unitTarget->CastSpell(unitTarget, spellid+urand(0, 4), true);
|
||||
break;
|
||||
@@ -5392,9 +5395,9 @@ void Spell::EffectDuel(uint32 i)
|
||||
//END
|
||||
|
||||
// Send request
|
||||
WorldPacket data(SMSG_DUEL_REQUESTED, 16);
|
||||
data << pGameObj->GetGUID();
|
||||
data << caster->GetGUID();
|
||||
WorldPacket data(SMSG_DUEL_REQUESTED, 8 + 8);
|
||||
data << uint64(pGameObj->GetGUID());
|
||||
data << uint64(caster->GetGUID());
|
||||
caster->GetSession()->SendPacket(&data);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
|
||||
@@ -5413,8 +5416,8 @@ void Spell::EffectDuel(uint32 i)
|
||||
duel2->startTimer = 0;
|
||||
target->duel = duel2;
|
||||
|
||||
caster->SetUInt64Value(PLAYER_DUEL_ARBITER,pGameObj->GetGUID());
|
||||
target->SetUInt64Value(PLAYER_DUEL_ARBITER,pGameObj->GetGUID());
|
||||
caster->SetUInt64Value(PLAYER_DUEL_ARBITER, pGameObj->GetGUID());
|
||||
target->SetUInt64Value(PLAYER_DUEL_ARBITER, pGameObj->GetGUID());
|
||||
}
|
||||
|
||||
void Spell::EffectStuck(uint32 /*i*/)
|
||||
@@ -5440,7 +5443,7 @@ void Spell::EffectStuck(uint32 /*i*/)
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(8690);
|
||||
if(!spellInfo)
|
||||
return;
|
||||
Spell spell(pTarget,spellInfo,true,0);
|
||||
Spell spell(pTarget, spellInfo, true, 0);
|
||||
spell.SendSpellCooldown();
|
||||
}
|
||||
|
||||
@@ -5453,8 +5456,8 @@ void Spell::EffectSummonPlayer(uint32 /*i*/)
|
||||
if(unitTarget->GetDummyAura(23445))
|
||||
return;
|
||||
|
||||
float x,y,z;
|
||||
m_caster->GetClosePoint(x,y,z,unitTarget->GetObjectSize());
|
||||
float x, y, z;
|
||||
m_caster->GetClosePoint(x, y, z, unitTarget->GetObjectSize());
|
||||
|
||||
((Player*)unitTarget)->SetSummonPoint(m_caster->GetMapId(),x,y,z);
|
||||
|
||||
@@ -5559,7 +5562,7 @@ void Spell::EffectEnchantHeldItem(uint32 i)
|
||||
|
||||
// Apply the temporary enchantment
|
||||
item->SetEnchantment(slot, enchant_id, duration*IN_MILISECONDS, 0);
|
||||
item_owner->ApplyEnchantment(item,slot,true);
|
||||
item_owner->ApplyEnchantment(item, slot, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5591,7 +5594,7 @@ void Spell::EffectInebriate(uint32 /*i*/)
|
||||
currentDrunk = 0xFFFF;
|
||||
else
|
||||
currentDrunk += drunkMod;
|
||||
player->SetDrunkValue(currentDrunk, m_CastItem?m_CastItem->GetEntry():0);
|
||||
player->SetDrunkValue(currentDrunk, m_CastItem ? m_CastItem->GetEntry() : 0);
|
||||
}
|
||||
|
||||
void Spell::EffectFeedPet(uint32 i)
|
||||
@@ -5620,7 +5623,7 @@ void Spell::EffectFeedPet(uint32 i)
|
||||
_player->DestroyItemCount(foodItem,count,true);
|
||||
// TODO: fix crash when a spell has two effects, both pointed at the same item target
|
||||
|
||||
m_caster->CastCustomSpell(pet,m_spellInfo->EffectTriggerSpell[i],&benefit,NULL,NULL,true);
|
||||
m_caster->CastCustomSpell(pet, m_spellInfo->EffectTriggerSpell[i], &benefit, NULL, NULL, true);
|
||||
}
|
||||
|
||||
void Spell::EffectDismissPet(uint32 /*i*/)
|
||||
@@ -5634,7 +5637,7 @@ void Spell::EffectDismissPet(uint32 /*i*/)
|
||||
if(!pet||!pet->isAlive())
|
||||
return;
|
||||
|
||||
((Player*)m_caster)->RemovePet(pet,PET_SAVE_NOT_IN_SLOT);
|
||||
((Player*)m_caster)->RemovePet(pet, PET_SAVE_NOT_IN_SLOT);
|
||||
}
|
||||
|
||||
void Spell::EffectSummonObject(uint32 i)
|
||||
@@ -5664,7 +5667,7 @@ void Spell::EffectSummonObject(uint32 i)
|
||||
|
||||
GameObject* pGameObj = new GameObject;
|
||||
|
||||
float x,y,z;
|
||||
float x, y, z;
|
||||
// If dest location if present
|
||||
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
||||
{
|
||||
@@ -5674,7 +5677,7 @@ void Spell::EffectSummonObject(uint32 i)
|
||||
}
|
||||
// Summon in random point all other units if location present
|
||||
else
|
||||
m_caster->GetClosePoint(x,y,z,DEFAULT_WORLD_OBJECT_SIZE);
|
||||
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
|
||||
|
||||
Map *map = m_caster->GetMap();
|
||||
if(!pGameObj->Create(objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), go_id, map,
|
||||
@@ -5692,8 +5695,8 @@ void Spell::EffectSummonObject(uint32 i)
|
||||
|
||||
map->Add(pGameObj);
|
||||
WorldPacket data(SMSG_GAMEOBJECT_SPAWN_ANIM_OBSOLETE, 8);
|
||||
data << pGameObj->GetGUID();
|
||||
m_caster->SendMessageToSet(&data,true);
|
||||
data << uint64(pGameObj->GetGUID());
|
||||
m_caster->SendMessageToSet(&data, true);
|
||||
|
||||
m_caster->m_ObjectSlot[slot] = pGameObj->GetGUID();
|
||||
}
|
||||
@@ -5848,7 +5851,7 @@ void Spell::EffectReputation(uint32 i)
|
||||
if(!factionEntry)
|
||||
return;
|
||||
|
||||
_player->GetReputationMgr().ModifyReputation(factionEntry,rep_change);
|
||||
_player->GetReputationMgr().ModifyReputation(factionEntry, rep_change);
|
||||
}
|
||||
|
||||
void Spell::EffectQuestComplete(uint32 i)
|
||||
@@ -6001,7 +6004,7 @@ void Spell::EffectPlayerPull(uint32 i)
|
||||
float vsin = sin(unitTarget->GetAngle(m_caster));
|
||||
float vcos = cos(unitTarget->GetAngle(m_caster));
|
||||
|
||||
WorldPacket data(SMSG_MOVE_KNOCK_BACK, (8+4+4+4+4+4));
|
||||
WorldPacket data(SMSG_MOVE_KNOCK_BACK, 8+4+4+4+4+4);
|
||||
data.append(unitTarget->GetPackGUID());
|
||||
data << uint32(0); // Sequence
|
||||
data << float(vcos); // x direction
|
||||
@@ -6099,7 +6102,7 @@ void Spell::EffectDurabilityDamage(uint32 i)
|
||||
// Possibly its mean -1 all player equipped items and -2 all items
|
||||
if(slot < 0)
|
||||
{
|
||||
((Player*)unitTarget)->DurabilityPointsLossAll(damage,(slot < -1));
|
||||
((Player*)unitTarget)->DurabilityPointsLossAll(damage, (slot < -1));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6107,8 +6110,8 @@ void Spell::EffectDurabilityDamage(uint32 i)
|
||||
if(slot >= INVENTORY_SLOT_BAG_END)
|
||||
return;
|
||||
|
||||
if(Item* item = ((Player*)unitTarget)->GetItemByPos(INVENTORY_SLOT_BAG_0,slot))
|
||||
((Player*)unitTarget)->DurabilityPointsLoss(item,damage);
|
||||
if(Item* item = ((Player*)unitTarget)->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
|
||||
((Player*)unitTarget)->DurabilityPointsLoss(item, damage);
|
||||
}
|
||||
|
||||
void Spell::EffectDurabilityDamagePCT(uint32 i)
|
||||
@@ -6122,7 +6125,7 @@ void Spell::EffectDurabilityDamagePCT(uint32 i)
|
||||
// Possibly its mean -1 all player equipped items and -2 all items
|
||||
if(slot < 0)
|
||||
{
|
||||
((Player*)unitTarget)->DurabilityLossAll(double(damage)/100.0f,(slot < -1));
|
||||
((Player*)unitTarget)->DurabilityLossAll(double(damage)/100.0f, (slot < -1));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6133,8 +6136,8 @@ void Spell::EffectDurabilityDamagePCT(uint32 i)
|
||||
if(damage <= 0)
|
||||
return;
|
||||
|
||||
if(Item* item = ((Player*)unitTarget)->GetItemByPos(INVENTORY_SLOT_BAG_0,slot))
|
||||
((Player*)unitTarget)->DurabilityLoss(item,double(damage)/100.0f);
|
||||
if(Item* item = ((Player*)unitTarget)->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
|
||||
((Player*)unitTarget)->DurabilityLoss(item, double(damage)/100.0f);
|
||||
}
|
||||
|
||||
void Spell::EffectModifyThreatPercent(uint32 /*effIndex*/)
|
||||
@@ -6157,7 +6160,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
||||
return;
|
||||
}
|
||||
|
||||
float fx,fy,fz;
|
||||
float fx, fy, fz;
|
||||
|
||||
if(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
||||
{
|
||||
@@ -6169,7 +6172,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
||||
else if(m_spellInfo->EffectRadiusIndex[effIndex] && m_spellInfo->speed==0)
|
||||
{
|
||||
float dis = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[effIndex]));
|
||||
m_caster->GetClosePoint(fx,fy,fz,DEFAULT_WORLD_OBJECT_SIZE, dis);
|
||||
m_caster->GetClosePoint(fx, fy, fz, DEFAULT_WORLD_OBJECT_SIZE, dis);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6178,14 +6181,14 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
||||
float max_dis = GetSpellMaxRangeForFriend(sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex));
|
||||
float dis = rand_norm() * (max_dis - min_dis) + min_dis;
|
||||
|
||||
m_caster->GetClosePoint(fx,fy,fz,DEFAULT_WORLD_OBJECT_SIZE, dis);
|
||||
m_caster->GetClosePoint(fx, fy, fz, DEFAULT_WORLD_OBJECT_SIZE, dis);
|
||||
}
|
||||
|
||||
Map *cMap = m_caster->GetMap();
|
||||
|
||||
if(goinfo->type==GAMEOBJECT_TYPE_FISHINGNODE)
|
||||
{
|
||||
if ( !cMap->IsInWater(fx,fy,fz-0.5f)) // Hack to prevent fishing bobber from failing to land on fishing hole
|
||||
if ( !cMap->IsInWater(fx, fy, fz-0.5f)) // Hack to prevent fishing bobber from failing to land on fishing hole
|
||||
{ // but this is not proper, we really need to ignore not materialized objects
|
||||
SendCastResult(SPELL_FAILED_NOT_HERE);
|
||||
SendChannelUpdate(0);
|
||||
@@ -6193,12 +6196,12 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
||||
}
|
||||
|
||||
// replace by water level in this case
|
||||
fz = cMap->GetWaterLevel(fx,fy);
|
||||
fz = cMap->GetWaterLevel(fx, fy);
|
||||
}
|
||||
// if gameobject is summoning object, it should be spawned right on caster's position
|
||||
else if(goinfo->type==GAMEOBJECT_TYPE_SUMMONING_RITUAL)
|
||||
{
|
||||
m_caster->GetPosition(fx,fy,fz);
|
||||
m_caster->GetPosition(fx, fy, fz);
|
||||
}
|
||||
|
||||
GameObject* pGameObj = new GameObject;
|
||||
@@ -6235,7 +6238,7 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
||||
}
|
||||
case GAMEOBJECT_TYPE_SUMMONING_RITUAL:
|
||||
{
|
||||
if(m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
pGameObj->AddUniqueUse((Player*)m_caster);
|
||||
m_caster->AddGameObject(pGameObj); // will removed at spell cancel
|
||||
|
||||
@@ -445,7 +445,7 @@ void WorldSession::HandleCancelChanneling( WorldPacket & /*recv_data */)
|
||||
*/
|
||||
}
|
||||
|
||||
void WorldSession::HandleTotemDestroy( WorldPacket& recvPacket)
|
||||
void WorldSession::HandleTotemDestroyed( WorldPacket& recvPacket)
|
||||
{
|
||||
CHECK_PACKET_SIZE(recvPacket, 1);
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ bool WorldSession::SendLearnNewTaxiNode( Creature* unit )
|
||||
return false;
|
||||
}
|
||||
|
||||
void WorldSession::HandleActivateTaxiFarOpcode ( WorldPacket & recv_data )
|
||||
void WorldSession::HandleActivateTaxiExpressOpcode ( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8+4+4);
|
||||
|
||||
@@ -171,7 +171,7 @@ void WorldSession::HandleActivateTaxiFarOpcode ( WorldPacket & recv_data )
|
||||
Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||
if (!npc)
|
||||
{
|
||||
sLog.outDebug( "WORLD: HandleActivateTaxiFarOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)) );
|
||||
sLog.outDebug( "WORLD: HandleActivateTaxiExpressOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)) );
|
||||
return;
|
||||
}
|
||||
// recheck
|
||||
@@ -194,7 +194,7 @@ void WorldSession::HandleActivateTaxiFarOpcode ( WorldPacket & recv_data )
|
||||
GetPlayer()->ActivateTaxiPathTo(nodes, npc);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTaxiNextDestinationOpcode(WorldPacket& /*recv_data*/)
|
||||
void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& /*recv_data*/)
|
||||
{
|
||||
sLog.outDebug( "WORLD: Received CMSG_MOVE_SPLINE_DONE" );
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@ void Transport::UpdateForMap(Map const* targetMap)
|
||||
UpdateData transData;
|
||||
BuildCreateUpdateBlockForPlayer(&transData, itr->getSource());
|
||||
WorldPacket packet;
|
||||
transData.BuildPacket(&packet, true);
|
||||
transData.BuildPacket(&packet);
|
||||
itr->getSource()->SendDirectMessage(&packet);
|
||||
}
|
||||
}
|
||||
@@ -577,7 +577,7 @@ void Transport::UpdateForMap(Map const* targetMap)
|
||||
UpdateData transData;
|
||||
BuildOutOfRangeUpdateBlock(&transData);
|
||||
WorldPacket out_packet;
|
||||
transData.BuildPacket(&out_packet, true);
|
||||
transData.BuildPacket(&out_packet);
|
||||
|
||||
for(Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
|
||||
if(this != itr->getSource()->GetTransport())
|
||||
|
||||
@@ -72,6 +72,7 @@ class Transport : protected GameObject
|
||||
using GameObject::GetPositionZ;
|
||||
using GameObject::BuildCreateUpdateBlockForPlayer;
|
||||
using GameObject::BuildOutOfRangeUpdateBlock;
|
||||
using GameObject::GetPackGUID;
|
||||
|
||||
bool Create(uint32 guidlow, uint32 mapid, float x, float y, float z, float ang, uint32 animprogress, uint32 dynflags);
|
||||
bool GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids);
|
||||
|
||||
+98
-104
@@ -376,6 +376,7 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 M
|
||||
}
|
||||
|
||||
data << uint32(MovementFlags);
|
||||
|
||||
data << uint32(Time); // Time in between points
|
||||
data << uint32(1); // 1 single waypoint
|
||||
data << NewPosX << NewPosY << NewPosZ; // the single waypoint Point B
|
||||
@@ -390,14 +391,14 @@ void Unit::SendMonsterMoveByPath(Path const& path, uint32 start, uint32 end)
|
||||
{
|
||||
uint32 traveltime = uint32(path.GetTotalLength(start, end) * 32);
|
||||
|
||||
uint32 pathSize = end-start;
|
||||
uint32 pathSize = end - start;
|
||||
|
||||
WorldPacket data( SMSG_MONSTER_MOVE, (GetPackGUID().size()+4+4+4+4+1+4+4+4+pathSize*4*3) );
|
||||
data.append(GetPackGUID());
|
||||
data << GetPositionX();
|
||||
data << GetPositionY();
|
||||
data << GetPositionZ();
|
||||
data << getMSTime();
|
||||
data << uint32(getMSTime());
|
||||
data << uint8( 0 );
|
||||
data << uint32(((GetUnitMovementFlags() & MOVEMENTFLAG_LEVITATING) || isInFlight())? (MOVEFLAG_FLY|MOVEFLAG_WALK) : MOVEFLAG_WALK);
|
||||
data << uint32( traveltime );
|
||||
@@ -1370,7 +1371,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss)
|
||||
if(pVictim != this && GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
const AreaTableEntry *area = GetAreaEntryByAreaID(pVictim->GetAreaId());
|
||||
if(area && area->flags & 0x800) //sanctuary
|
||||
if(area && area->flags & AREA_FLAG_SANCTUARY) // sanctuary
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1606,11 +1607,11 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
|
||||
if(pVictim != this && GetTypeId() == TYPEID_PLAYER && pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
const AreaTableEntry *area = GetAreaEntryByAreaID(pVictim->GetAreaId());
|
||||
if(area && area->flags & 0x800) //sanctuary
|
||||
if(area && area->flags & AREA_FLAG_SANCTUARY) // sanctuary
|
||||
return;
|
||||
}
|
||||
|
||||
// Hmmmm dont like this emotes cloent must by self do all animations
|
||||
// Hmmmm dont like this emotes client must by self do all animations
|
||||
if (damageInfo->HitInfo&HITINFO_CRITICALHIT)
|
||||
pVictim->HandleEmoteCommand(EMOTE_ONESHOT_WOUNDCRITICAL);
|
||||
if(damageInfo->blocked_amount && damageInfo->TargetState!=VICTIMSTATE_BLOCKS)
|
||||
@@ -1759,7 +1760,7 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
|
||||
|
||||
void Unit::HandleEmoteCommand(uint32 anim_id)
|
||||
{
|
||||
WorldPacket data( SMSG_EMOTE, 12 );
|
||||
WorldPacket data( SMSG_EMOTE, 4 + 8 );
|
||||
data << uint32(anim_id);
|
||||
data << uint64(GetGUID());
|
||||
SendMessageToSet(&data, true);
|
||||
@@ -2642,7 +2643,7 @@ float Unit::CalculateLevelPenalty(SpellEntry const* spellProto) const
|
||||
|
||||
void Unit::SendAttackStart(Unit* pVictim)
|
||||
{
|
||||
WorldPacket data( SMSG_ATTACKSTART, 16 );
|
||||
WorldPacket data( SMSG_ATTACKSTART, 8 + 8 );
|
||||
data << uint64(GetGUID());
|
||||
data << uint64(pVictim->GetGUID());
|
||||
|
||||
@@ -4507,7 +4508,7 @@ void Unit::RemoveAllGameObjects()
|
||||
|
||||
void Unit::SendSpellNonMeleeDamageLog(SpellNonMeleeDamage *log)
|
||||
{
|
||||
WorldPacket data(SMSG_SPELLNONMELEEDAMAGELOG, (16+4+4+1+4+4+1+1+4+4+1)); // we guess size
|
||||
WorldPacket data(SMSG_SPELLNONMELEEDAMAGELOG, (16+4+4+4+1+4+4+1+1+4+4+1)); // we guess size
|
||||
data.append(log->target->GetPackGUID());
|
||||
data.append(log->attacker->GetPackGUID());
|
||||
data << uint32(log->SpellID);
|
||||
@@ -4525,10 +4526,10 @@ void Unit::SendSpellNonMeleeDamageLog(SpellNonMeleeDamage *log)
|
||||
SendMessageToSet( &data, true );
|
||||
}
|
||||
|
||||
void Unit::SendSpellNonMeleeDamageLog(Unit *target,uint32 SpellID,uint32 Damage, SpellSchoolMask damageSchoolMask,uint32 AbsorbedDamage, uint32 Resist,bool PhysicalDamage, uint32 Blocked, bool CriticalHit)
|
||||
void Unit::SendSpellNonMeleeDamageLog(Unit *target, uint32 SpellID, uint32 Damage, SpellSchoolMask damageSchoolMask, uint32 AbsorbedDamage, uint32 Resist, bool PhysicalDamage, uint32 Blocked, bool CriticalHit)
|
||||
{
|
||||
SpellNonMeleeDamage log(this,target,SpellID,damageSchoolMask);
|
||||
log.damage = Damage-AbsorbedDamage-Resist-Blocked;
|
||||
SpellNonMeleeDamage log(this, target, SpellID, damageSchoolMask);
|
||||
log.damage = Damage - AbsorbedDamage - Resist - Blocked;
|
||||
log.absorb = AbsorbedDamage;
|
||||
log.resist = Resist;
|
||||
log.physicalLog = PhysicalDamage;
|
||||
@@ -4550,6 +4551,51 @@ void Unit::ProcDamageAndSpell(Unit *pVictim, uint32 procAttacker, uint32 procVic
|
||||
pVictim->ProcDamageAndSpellFor(true,this,procVictim, procExtra, attType, procSpell, amount, procAura);
|
||||
}
|
||||
|
||||
void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo)
|
||||
{
|
||||
AuraEffect *aura = pInfo->auraEff;
|
||||
|
||||
WorldPacket data(SMSG_PERIODICAURALOG, 30);
|
||||
data.append(GetPackGUID());
|
||||
data.appendPackGUID(aura->GetCasterGUID());
|
||||
data << uint32(aura->GetId()); // spellId
|
||||
data << uint32(1); // count
|
||||
data << uint32(aura->GetAuraName()); // auraId
|
||||
switch(aura->GetAuraName())
|
||||
{
|
||||
case SPELL_AURA_PERIODIC_DAMAGE:
|
||||
case SPELL_AURA_PERIODIC_DAMAGE_PERCENT:
|
||||
data << uint32(pInfo->damage); // damage
|
||||
data << uint32(pInfo->overDamage); // overkill?
|
||||
data << uint32(GetSpellSchoolMask(aura->GetSpellProto()));
|
||||
data << uint32(pInfo->absorb); // absorb
|
||||
data << uint32(pInfo->resist); // resist
|
||||
data << uint8(0); // new 3.1.2
|
||||
break;
|
||||
case SPELL_AURA_PERIODIC_HEAL:
|
||||
case SPELL_AURA_OBS_MOD_HEALTH:
|
||||
data << uint32(pInfo->damage); // damage
|
||||
data << uint32(pInfo->overDamage); // overheal?
|
||||
data << uint8(0); // new 3.1.2
|
||||
break;
|
||||
case SPELL_AURA_OBS_MOD_ENERGY:
|
||||
case SPELL_AURA_PERIODIC_ENERGIZE:
|
||||
data << uint32(aura->GetMiscValue()); // power type
|
||||
data << uint32(pInfo->damage); // damage
|
||||
break;
|
||||
case SPELL_AURA_PERIODIC_MANA_LEECH:
|
||||
data << uint32(aura->GetMiscValue()); // power type
|
||||
data << uint32(pInfo->damage); // amount
|
||||
data << float(pInfo->multiplier); // gain multiplier
|
||||
break;
|
||||
default:
|
||||
sLog.outError("Unit::SendPeriodicAuraLog: unknown aura %u", uint32(aura->GetAuraName()));
|
||||
return;
|
||||
}
|
||||
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void Unit::SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo)
|
||||
{
|
||||
WorldPacket data(SMSG_SPELLLOGMISS, (4+8+1+4+8+1));
|
||||
@@ -4566,41 +4612,43 @@ void Unit::SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo)
|
||||
|
||||
void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo)
|
||||
{
|
||||
uint32 count = 1;
|
||||
WorldPacket data(SMSG_ATTACKERSTATEUPDATE, (16+45)); // we guess size
|
||||
data << (uint32)damageInfo->HitInfo;
|
||||
data.append(GetPackGUID());
|
||||
data.append(damageInfo->target->GetPackGUID());
|
||||
data << (uint32)(damageInfo->damage); // Full damage
|
||||
data << uint32(int32 (damageInfo->target->GetHealth()-damageInfo->damage ) >0 ? 0 : damageInfo->damage - damageInfo->target->GetHealth()); // Overkill
|
||||
sLog.outDebug("WORLD: Sending SMSG_ATTACKERSTATEUPDATE");
|
||||
|
||||
data << (uint8)count; // Sub damage count
|
||||
uint32 count = 1;
|
||||
WorldPacket data(SMSG_ATTACKERSTATEUPDATE, 16 + 45); // we guess size
|
||||
data << uint32(damageInfo->HitInfo);
|
||||
data.append(damageInfo->attacker->GetPackGUID());
|
||||
data.append(damageInfo->target->GetPackGUID());
|
||||
data << uint32(damageInfo->damage); // Full damage
|
||||
int32 overkill = damageInfo->damage - damageInfo->target->GetHealth();
|
||||
data << uint32(overkill < 0 ? 0 : overkill); // Overkill
|
||||
data << uint8(count); // Sub damage count
|
||||
|
||||
for(int i = 0; i < count; ++i)
|
||||
{
|
||||
data << (uint32)(damageInfo->damageSchoolMask); // School of sub damage
|
||||
data << (float)damageInfo->damage; // sub damage
|
||||
data << (uint32)damageInfo->damage; // Sub Damage
|
||||
data << uint32(damageInfo->damageSchoolMask); // School of sub damage
|
||||
data << float(damageInfo->damage); // sub damage
|
||||
data << uint32(damageInfo->damage); // Sub Damage
|
||||
}
|
||||
|
||||
if(damageInfo->HitInfo & (HITINFO_ABSORB | HITINFO_ABSORB2))
|
||||
{
|
||||
for(int i = 0; i < count; ++i)
|
||||
data << (uint32)damageInfo->absorb; // Absorb
|
||||
data << uint32(damageInfo->absorb); // Absorb
|
||||
}
|
||||
|
||||
if(damageInfo->HitInfo & (HITINFO_RESIST | HITINFO_RESIST2))
|
||||
{
|
||||
for(int i = 0; i < count; ++i)
|
||||
data << (uint32)damageInfo->resist; // Resist
|
||||
data << uint32(damageInfo->resist); // Resist
|
||||
}
|
||||
|
||||
data << (uint8)damageInfo->TargetState;
|
||||
data << (uint32)0;
|
||||
data << (uint32)0;
|
||||
data << uint8(damageInfo->TargetState);
|
||||
data << uint32(0);
|
||||
data << uint32(0);
|
||||
|
||||
if(damageInfo->HitInfo & HITINFO_BLOCK)
|
||||
data << (uint32)damageInfo->blocked_amount;
|
||||
data << uint32(damageInfo->blocked_amount);
|
||||
|
||||
if(damageInfo->HitInfo & HITINFO_UNK3)
|
||||
data << uint32(0);
|
||||
@@ -4629,72 +4677,17 @@ void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo)
|
||||
|
||||
void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit *target, uint8 SwingType, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount)
|
||||
{
|
||||
sLog.outDebug("WORLD: Sending SMSG_ATTACKERSTATEUPDATE");
|
||||
|
||||
WorldPacket data(SMSG_ATTACKERSTATEUPDATE, (16+45)); // we guess size
|
||||
data << uint32(HitInfo); // flags
|
||||
data.append(GetPackGUID());
|
||||
data.append(target->GetPackGUID());
|
||||
int32 damageDone = Damage-AbsorbDamage-Resist-BlockedAmount;
|
||||
data << uint32(damageDone);// damage
|
||||
data << uint32(int32 (target->GetHealth()-damageDone ) >0 ? 0 : damageDone - target->GetHealth()); // Overkill
|
||||
|
||||
data << (uint8)SwingType; // count?
|
||||
|
||||
// for(i = 0; i < SwingType; ++i)
|
||||
data << (uint32)damageSchoolMask;
|
||||
data << (float)(damageDone);
|
||||
data << (uint32)(damageDone);
|
||||
// end loop
|
||||
|
||||
if(HitInfo & (HITINFO_ABSORB | HITINFO_ABSORB2))
|
||||
{
|
||||
// for(i = 0; i < SwingType; ++i)
|
||||
data << uint32(AbsorbDamage);
|
||||
// end loop
|
||||
}
|
||||
|
||||
if(HitInfo & (HITINFO_RESIST | HITINFO_RESIST2))
|
||||
{
|
||||
// for(i = 0; i < SwingType; ++i)
|
||||
data << uint32(Resist);
|
||||
// end loop
|
||||
}
|
||||
|
||||
data << (uint8)TargetState;
|
||||
data << (uint32)0;
|
||||
data << (uint32)0;
|
||||
|
||||
if(HitInfo & HITINFO_BLOCK)
|
||||
{
|
||||
data << uint32(BlockedAmount);
|
||||
}
|
||||
|
||||
if(HitInfo & HITINFO_UNK3)
|
||||
{
|
||||
data << uint32(0);
|
||||
}
|
||||
|
||||
if(HitInfo & HITINFO_UNK1)
|
||||
{
|
||||
data << uint32(0);
|
||||
data << float(0);
|
||||
data << float(0);
|
||||
data << float(0);
|
||||
data << float(0);
|
||||
data << float(0);
|
||||
data << float(0);
|
||||
data << float(0);
|
||||
data << float(0);
|
||||
for(uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
data << float(0);
|
||||
data << float(0);
|
||||
}
|
||||
data << uint32(0);
|
||||
}
|
||||
|
||||
SendMessageToSet( &data, true );
|
||||
CalcDamageInfo dmgInfo;
|
||||
dmgInfo.HitInfo = HitInfo;
|
||||
dmgInfo.attacker = this;
|
||||
dmgInfo.target = target;
|
||||
dmgInfo.damage = Damage - AbsorbDamage - Resist - BlockedAmount;
|
||||
dmgInfo.damageSchoolMask = damageSchoolMask;
|
||||
dmgInfo.absorb = AbsorbDamage;
|
||||
dmgInfo.resist = Resist;
|
||||
dmgInfo.TargetState = TargetState;
|
||||
dmgInfo.blocked_amount = BlockedAmount;
|
||||
SendAttackStateUpdate(&dmgInfo);
|
||||
}
|
||||
|
||||
bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, AuraEffect* triggeredByAura, SpellEntry const * procSpell, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 cooldown)
|
||||
@@ -7370,7 +7363,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
||||
if( m_extraAttacks && IsSpellHaveEffect(triggerEntry, SPELL_EFFECT_ADD_EXTRA_ATTACKS) )
|
||||
return false;
|
||||
|
||||
// Costum requirements (not listed in procEx) Warning! damage dealing after this
|
||||
// Custom requirements (not listed in procEx) Warning! damage dealing after this
|
||||
// Custom triggered spells
|
||||
switch (auraSpellInfo->Id)
|
||||
{
|
||||
@@ -7404,7 +7397,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
||||
// Greater Heal Refund (Avatar Raiment set)
|
||||
case 37594:
|
||||
{
|
||||
// Not give if target alredy have full health
|
||||
// Not give if target already have full health
|
||||
if (pVictim->GetHealth() == pVictim->GetMaxHealth())
|
||||
return false;
|
||||
// If your Greater Heal brings the target to full health, you gain $37595s1 mana.
|
||||
@@ -7439,7 +7432,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
||||
}
|
||||
}
|
||||
|
||||
// Costum basepoints/target for exist spell
|
||||
// Custom basepoints/target for exist spell
|
||||
// dummy basepoints or other customs
|
||||
switch(trigger_spell_id)
|
||||
{
|
||||
@@ -7452,7 +7445,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
||||
target = pVictim;
|
||||
break;
|
||||
}
|
||||
// Combo points add triggers (need add combopoint only for main tatget, and after possible combopoints reset)
|
||||
// Combo points add triggers (need add combopoint only for main target, and after possible combopoints reset)
|
||||
case 15250: // Rogue Setup
|
||||
{
|
||||
if(!pVictim || pVictim != getVictim()) // applied only for main target
|
||||
@@ -10625,7 +10618,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
|
||||
void Unit::SetHover(bool on)
|
||||
{
|
||||
if(on)
|
||||
CastSpell(this,11010,true);
|
||||
CastSpell(this, 11010, true);
|
||||
else
|
||||
RemoveAurasDueToSpell(11010);
|
||||
}
|
||||
@@ -12344,7 +12337,7 @@ void Unit::SendPetCastFail(uint32 spellid, SpellCastResult msg)
|
||||
if(!owner || owner->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_PET_CAST_FAILED, (4+1));
|
||||
WorldPacket data(SMSG_PET_CAST_FAILED, 1 + 4 + 1);
|
||||
data << uint8(0); // cast count?
|
||||
data << uint32(spellid);
|
||||
data << uint8(msg);
|
||||
@@ -12370,7 +12363,7 @@ void Unit::SendPetTalk (uint32 pettalk)
|
||||
if(!owner || owner->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_PET_ACTION_SOUND, 8+4);
|
||||
WorldPacket data(SMSG_PET_ACTION_SOUND, 8 + 4);
|
||||
data << uint64(GetGUID());
|
||||
data << uint32(pettalk);
|
||||
((Player*)owner)->GetSession()->SendPacket(&data);
|
||||
@@ -12397,7 +12390,7 @@ void Unit::SendPetClearCooldown (uint32 spellid)
|
||||
if(!owner || owner->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_CLEAR_COOLDOWN, (4+8));
|
||||
WorldPacket data(SMSG_CLEAR_COOLDOWN, 4+8);
|
||||
data << uint32(spellid);
|
||||
data << uint64(GetGUID());
|
||||
((Player*)owner)->GetSession()->SendPacket(&data);
|
||||
@@ -12409,8 +12402,9 @@ void Unit::SendPetAIReaction(uint64 guid)
|
||||
if(!owner || owner->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_AI_REACTION, 12);
|
||||
data << uint64(guid) << uint32(00000002);
|
||||
WorldPacket data(SMSG_AI_REACTION, 8 + 4);
|
||||
data << uint64(guid);
|
||||
data << uint32(AI_REACTION_AGGRO);
|
||||
((Player*)owner)->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
|
||||
+54
-4
@@ -638,8 +638,8 @@ enum MovementFlags
|
||||
MOVEMENTFLAG_RIGHT = 0x00000020,
|
||||
MOVEMENTFLAG_PITCH_UP = 0x00000040,
|
||||
MOVEMENTFLAG_PITCH_DOWN = 0x00000080,
|
||||
MOVEMENTFLAG_WALK_MODE = 0x00000100,
|
||||
MOVEMENTFLAG_ONTRANSPORT = 0x00000200,
|
||||
MOVEMENTFLAG_WALK_MODE = 0x00000100, // Walking
|
||||
MOVEMENTFLAG_ONTRANSPORT = 0x00000200, // Used for flying on some creatures
|
||||
MOVEMENTFLAG_LEVITATING = 0x00000400,
|
||||
MOVEMENTFLAG_FLY_UNK1 = 0x00000800,
|
||||
MOVEMENTFLAG_JUMPING = 0x00001000,
|
||||
@@ -658,6 +658,42 @@ enum MovementFlags
|
||||
MOVEMENTFLAG_UNK3 = 0x40000000
|
||||
};
|
||||
|
||||
enum MonsterMovementFlags
|
||||
{
|
||||
MONSTER_MOVE_NONE = 0x00000000,
|
||||
MONSTER_MOVE_FORWARD = 0x00000001,
|
||||
MONSTER_MOVE_BACKWARD = 0x00000002,
|
||||
MONSTER_MOVE_STRAFE_LEFT = 0x00000004,
|
||||
MONSTER_MOVE_STRAFE_RIGHT = 0x00000008,
|
||||
MONSTER_MOVE_LEFT = 0x00000010, // turn
|
||||
MONSTER_MOVE_RIGHT = 0x00000020, // turn
|
||||
MONSTER_MOVE_PITCH_UP = 0x00000040,
|
||||
MONSTER_MOVE_PITCH_DOWN = 0x00000080,
|
||||
MONSTER_MOVE_TELEPORT = 0x00000100,
|
||||
MONSTER_MOVE_TELEPORT2 = 0x00000200,
|
||||
MONSTER_MOVE_LEVITATING = 0x00000400,
|
||||
MONSTER_MOVE_UNK1 = 0x00000800, // float+uint32
|
||||
MONSTER_MOVE_WALK = 0x00001000, // run2?
|
||||
MONSTER_MOVE_SPLINE = 0x00002000, // spline n*(float x,y,z)
|
||||
// 0x4000, 0x8000, 0x10000, 0x20000 run
|
||||
MONSTER_MOVE_SPLINE2 = 0x00040000, // spline n*(float x,y,z)
|
||||
MONSTER_MOVE_UNK2 = 0x00080000, // used for flying mobs
|
||||
MONSTER_MOVE_UNK3 = 0x00100000, // used for flying mobs
|
||||
MONSTER_MOVE_UNK4 = 0x00200000, // uint8+uint32
|
||||
MONSTER_MOVE_UNK5 = 0x00400000, // run in place, then teleport to final point
|
||||
MONSTER_MOVE_UNK6 = 0x00800000, // teleport
|
||||
MONSTER_MOVE_UNK7 = 0x01000000, // run
|
||||
MONSTER_MOVE_FLY = 0x02000000, // swimming/flying (depends on mob?)
|
||||
MONSTER_MOVE_UNK9 = 0x04000000, // run
|
||||
MONSTER_MOVE_UNK10 = 0x08000000, // run
|
||||
MONSTER_MOVE_UNK11 = 0x10000000, // run
|
||||
MONSTER_MOVE_UNK12 = 0x20000000, // run
|
||||
MONSTER_MOVE_UNK13 = 0x40000000, // levitating
|
||||
|
||||
// masks
|
||||
MONSTER_MOVE_SPLINE_FLY = 0x00003000, // fly by points
|
||||
};
|
||||
|
||||
struct MovementInfo
|
||||
{
|
||||
// common
|
||||
@@ -743,7 +779,7 @@ struct CalcDamageInfo
|
||||
uint32 procAttacker;
|
||||
uint32 procVictim;
|
||||
uint32 procEx;
|
||||
uint32 cleanDamage; // Used only fo rage calcultion
|
||||
uint32 cleanDamage; // Used only for rage calculation
|
||||
MeleeHitOutcome hitOutCome; // TODO: remove this field (need use TargetState)
|
||||
};
|
||||
|
||||
@@ -770,6 +806,19 @@ struct SpellNonMeleeDamage{
|
||||
uint32 cleanDamage;
|
||||
};
|
||||
|
||||
struct SpellPeriodicAuraLogInfo
|
||||
{
|
||||
SpellPeriodicAuraLogInfo(AuraEffect *_auraEff, uint32 _damage, uint32 _overDamage, uint32 _absorb, uint32 _resist, float _multiplier)
|
||||
: auraEff(_auraEff), damage(_damage), overDamage(_overDamage), absorb(_absorb), resist(_resist), multiplier(_multiplier) {}
|
||||
|
||||
AuraEffect *auraEff;
|
||||
uint32 damage;
|
||||
uint32 absorb;
|
||||
uint32 resist;
|
||||
uint32 overDamage; // overkill/overheal
|
||||
float multiplier;
|
||||
};
|
||||
|
||||
uint32 createProcExtendMask(SpellNonMeleeDamage *damageInfo, SpellMissInfo missCondition);
|
||||
|
||||
#define MAX_DECLINED_NAME_CASES 5
|
||||
@@ -1216,7 +1265,8 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
|
||||
void SendAttackStateUpdate(CalcDamageInfo *damageInfo);
|
||||
void SendAttackStateUpdate(uint32 HitInfo, Unit *target, uint8 SwingType, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount);
|
||||
void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage *log);
|
||||
void SendSpellNonMeleeDamageLog(Unit *target,uint32 SpellID,uint32 Damage, SpellSchoolMask damageSchoolMask,uint32 AbsorbedDamage, uint32 Resist,bool PhysicalDamage, uint32 Blocked, bool CriticalHit = false);
|
||||
void SendSpellNonMeleeDamageLog(Unit *target,uint32 SpellID, uint32 Damage, SpellSchoolMask damageSchoolMask, uint32 AbsorbedDamage, uint32 Resist, bool PhysicalDamage, uint32 Blocked, bool CriticalHit = false);
|
||||
void SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo);
|
||||
void SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo);
|
||||
|
||||
void NearTeleportTo(float x, float y, float z, float orientation, bool casting = false);
|
||||
|
||||
+12
-17
@@ -103,24 +103,20 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
|
||||
*dst_size = c_stream.total_out;
|
||||
}
|
||||
|
||||
bool UpdateData::BuildPacket(WorldPacket *packet, bool /*hasTransport*/)
|
||||
bool UpdateData::BuildPacket(WorldPacket *packet)
|
||||
{
|
||||
ByteBuffer buf(m_data.size() + 10 + m_outOfRangeGUIDs.size()*8);
|
||||
ByteBuffer buf(m_data.size());
|
||||
|
||||
buf << (uint32) (!m_outOfRangeGUIDs.empty() ? m_blockCount + 1 : m_blockCount);
|
||||
//buf << (uint8) (hasTransport ? 1 : 0);
|
||||
|
||||
if(!m_outOfRangeGUIDs.empty())
|
||||
{
|
||||
buf << (uint8) UPDATETYPE_OUT_OF_RANGE_OBJECTS;
|
||||
buf << (uint32) m_outOfRangeGUIDs.size();
|
||||
|
||||
for(std::set<uint64>::const_iterator i = m_outOfRangeGUIDs.begin();
|
||||
i != m_outOfRangeGUIDs.end(); ++i)
|
||||
for(std::set<uint64>::const_iterator i = m_outOfRangeGUIDs.begin(); i != m_outOfRangeGUIDs.end(); ++i)
|
||||
{
|
||||
//buf.appendPackGUID(*i);
|
||||
buf << (uint8)0xFF;
|
||||
buf << (uint64) *i;
|
||||
buf.appendPackGUID(*i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,24 +124,23 @@ bool UpdateData::BuildPacket(WorldPacket *packet, bool /*hasTransport*/)
|
||||
|
||||
packet->clear();
|
||||
|
||||
if (m_data.size() > 50 )
|
||||
size_t pSize = buf.size();
|
||||
|
||||
if (pSize > 100 ) // compress large packets
|
||||
{
|
||||
uint32 destsize = buf.size() + buf.size()/10 + 16;
|
||||
packet->resize( destsize );
|
||||
packet->resize(pSize);
|
||||
|
||||
packet->put(0, (uint32)buf.size());
|
||||
packet->put<uint32>(0, pSize);
|
||||
|
||||
Compress(const_cast<uint8*>(packet->contents()) + sizeof(uint32),
|
||||
&destsize,
|
||||
(void*)buf.contents(),
|
||||
buf.size());
|
||||
uint32 destsize = pSize;
|
||||
Compress(const_cast<uint8*>(packet->contents()) + sizeof(uint32), &destsize, (void*)buf.contents(), pSize);
|
||||
if (destsize == 0)
|
||||
return false;
|
||||
|
||||
packet->resize( destsize + sizeof(uint32) );
|
||||
packet->SetOpcode( SMSG_COMPRESSED_UPDATE_OBJECT );
|
||||
}
|
||||
else
|
||||
else // send small packets without compression
|
||||
{
|
||||
packet->append( buf );
|
||||
packet->SetOpcode( SMSG_UPDATE_OBJECT );
|
||||
|
||||
+12
-10
@@ -35,15 +35,17 @@ enum OBJECT_UPDATE_TYPE
|
||||
|
||||
enum OBJECT_UPDATE_FLAGS
|
||||
{
|
||||
UPDATEFLAG_NONE = 0x00,
|
||||
UPDATEFLAG_SELF = 0x01,
|
||||
UPDATEFLAG_TRANSPORT = 0x02,
|
||||
UPDATEFLAG_HAS_TARGET = 0x04,
|
||||
UPDATEFLAG_LOWGUID = 0x08,
|
||||
UPDATEFLAG_HIGHGUID = 0x10,
|
||||
UPDATEFLAG_LIVING = 0x20,
|
||||
UPDATEFLAG_HAS_POSITION = 0x40,
|
||||
UPDATEFLAG_VEHICLE = 0x80
|
||||
UPDATEFLAG_NONE = 0x0000,
|
||||
UPDATEFLAG_SELF = 0x0001,
|
||||
UPDATEFLAG_TRANSPORT = 0x0002,
|
||||
UPDATEFLAG_HAS_TARGET = 0x0004,
|
||||
UPDATEFLAG_LOWGUID = 0x0008,
|
||||
UPDATEFLAG_HIGHGUID = 0x0010,
|
||||
UPDATEFLAG_LIVING = 0x0020,
|
||||
UPDATEFLAG_HAS_POSITION = 0x0040,
|
||||
UPDATEFLAG_VEHICLE = 0x0080,
|
||||
UPDATEFLAG_POSITION = 0x0100,
|
||||
UPDATEFLAG_ROTATION = 0x0200
|
||||
};
|
||||
|
||||
class UpdateData
|
||||
@@ -54,7 +56,7 @@ class UpdateData
|
||||
void AddOutOfRangeGUID(std::set<uint64>& guids);
|
||||
void AddOutOfRangeGUID(const uint64 &guid);
|
||||
void AddUpdateBlock(const ByteBuffer &block);
|
||||
bool BuildPacket(WorldPacket *packet, bool hasTransport = false);
|
||||
bool BuildPacket(WorldPacket *packet);
|
||||
bool HasData() { return m_blockCount > 0 || !m_outOfRangeGUIDs.empty(); }
|
||||
void Clear();
|
||||
|
||||
|
||||
@@ -24,23 +24,23 @@
|
||||
#include "Opcodes.h"
|
||||
#include "Log.h"
|
||||
|
||||
void WorldSession::HandleVoiceSettingsOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleVoiceSessionEnableOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_VOICE_SETTINGS");
|
||||
sLog.outDebug("WORLD: CMSG_VOICE_SESSION_ENABLE");
|
||||
// uint8 isVoiceEnabled, uint8 isMicrophoneEnabled
|
||||
recv_data.hexlike();
|
||||
}
|
||||
|
||||
void WorldSession::HandleChannelEnableVoiceOpcode( WorldPacket & recv_data )
|
||||
void WorldSession::HandleChannelVoiceOnOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CHANNEL_ENABLE_VOICE");
|
||||
sLog.outDebug("WORLD: CMSG_CHANNEL_VOICE_ON");
|
||||
// Enable Voice button in channel context menu
|
||||
recv_data.hexlike();
|
||||
}
|
||||
|
||||
void WorldSession::HandleChannelVoiceChatQuery( WorldPacket & recv_data )
|
||||
void WorldSession::HandleSetActiveVoiceChannel( WorldPacket & recv_data )
|
||||
{
|
||||
sLog.outDebug("WORLD: CMSG_CHANNEL_VOICE_CHAT_QUERY");
|
||||
sLog.outDebug("WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL");
|
||||
// uint32, string
|
||||
recv_data.hexlike();
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ bool WorldSession::Update(uint32 /*diff*/)
|
||||
(this->*opHandle.handler)(*packet);
|
||||
// lag can cause STATUS_LOGGEDIN opcodes to arrive after the player started a transfer
|
||||
break;
|
||||
case STATUS_TRANSFER_PENDING:
|
||||
case STATUS_TRANSFER:
|
||||
if(!_player)
|
||||
logUnexpectedOpcode(packet, "the player has not logged in yet");
|
||||
else if(_player->IsInWorld())
|
||||
@@ -350,12 +350,12 @@ void WorldSession::LogoutPlayer(bool Save)
|
||||
if(Save)
|
||||
{
|
||||
uint32 eslot;
|
||||
for(int j = BUYBACK_SLOT_START; j < BUYBACK_SLOT_END; j++)
|
||||
for(int j = BUYBACK_SLOT_START; j < BUYBACK_SLOT_END; ++j)
|
||||
{
|
||||
eslot = j - BUYBACK_SLOT_START;
|
||||
_player->SetUInt64Value(PLAYER_FIELD_VENDORBUYBACK_SLOT_1+eslot*2,0);
|
||||
_player->SetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1+eslot,0);
|
||||
_player->SetUInt32Value(PLAYER_FIELD_BUYBACK_TIMESTAMP_1+eslot,0);
|
||||
_player->SetUInt64Value(PLAYER_FIELD_VENDORBUYBACK_SLOT_1 + (eslot * 2), 0);
|
||||
_player->SetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1 + eslot, 0);
|
||||
_player->SetUInt32Value(PLAYER_FIELD_BUYBACK_TIMESTAMP_1 + eslot, 0);
|
||||
}
|
||||
_player->SaveToDB();
|
||||
}
|
||||
|
||||
+92
-92
@@ -282,8 +282,8 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleMountSpecialAnimOpcode(WorldPacket &recvdata);
|
||||
|
||||
// character view
|
||||
void HandleToggleHelmOpcode(WorldPacket& recv_data);
|
||||
void HandleToggleCloakOpcode(WorldPacket& recv_data);
|
||||
void HandleShowingHelmOpcode(WorldPacket& recv_data);
|
||||
void HandleShowingCloakOpcode(WorldPacket& recv_data);
|
||||
|
||||
// repair
|
||||
void HandleRepairItemOpcode(WorldPacket& recvPacket);
|
||||
@@ -308,11 +308,11 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleLogoutCancelOpcode(WorldPacket& recvPacket);
|
||||
|
||||
// GM Ticket opcodes
|
||||
void HandleGMTicketCreateOpcode(WorldPacket& recvPacket);
|
||||
void HandleGMTicketUpdateOpcode(WorldPacket& recvPacket);
|
||||
void HandleGMTicketDeleteOpcode(WorldPacket& recvPacket);
|
||||
void HandleGMTicketGetTicketOpcode(WorldPacket& recvPacket);
|
||||
void HandleGMTicketSystemStatusOpcode(WorldPacket& recvPacket);
|
||||
void HandleGMTicketCreateOpcode(WorldPacket& recvPacket);
|
||||
void HandleGMTicketUpdateOpcode(WorldPacket& recvPacket);
|
||||
void HandleGMTicketDeleteOpcode(WorldPacket& recvPacket);
|
||||
void HandleGMTicketGetTicketOpcode(WorldPacket& recvPacket);
|
||||
void HandleGMTicketSystemStatusOpcode(WorldPacket& recvPacket);
|
||||
|
||||
//void HandleGMSurveySubmit(WorldPacket& recvPacket);
|
||||
|
||||
@@ -323,14 +323,14 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleSetSelectionOpcode(WorldPacket& recvPacket);
|
||||
void HandleStandStateChangeOpcode(WorldPacket& recvPacket);
|
||||
void HandleEmoteOpcode(WorldPacket& recvPacket);
|
||||
void HandleFriendListOpcode(WorldPacket& recvPacket);
|
||||
void HandleContactListOpcode(WorldPacket& recvPacket);
|
||||
void HandleAddFriendOpcode(WorldPacket& recvPacket);
|
||||
static void HandleAddFriendOpcodeCallBack(QueryResult *result, uint32 accountId, std::string friendNote);
|
||||
void HandleDelFriendOpcode(WorldPacket& recvPacket);
|
||||
void HandleAddIgnoreOpcode(WorldPacket& recvPacket);
|
||||
static void HandleAddIgnoreOpcodeCallBack(QueryResult *result, uint32 accountId);
|
||||
void HandleDelIgnoreOpcode(WorldPacket& recvPacket);
|
||||
void HandleSetFriendNoteOpcode(WorldPacket& recvPacket);
|
||||
void HandleSetContactNotesOpcode(WorldPacket& recvPacket);
|
||||
void HandleBugOpcode(WorldPacket& recvPacket);
|
||||
void HandleSetAmmoOpcode(WorldPacket& recvPacket);
|
||||
void HandleItemNameQueryOpcode(WorldPacket& recvPacket);
|
||||
@@ -339,8 +339,8 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
|
||||
void HandleSetFactionAtWar( WorldPacket & recv_data );
|
||||
void HandleSetFactionCheat( WorldPacket & recv_data );
|
||||
void HandleSetWatchedFactionIndexOpcode(WorldPacket & recv_data);
|
||||
void HandleSetWatchedFactionInactiveOpcode(WorldPacket & recv_data);
|
||||
void HandleSetWatchedFactionOpcode(WorldPacket & recv_data);
|
||||
void HandleSetFactionInactiveOpcode(WorldPacket & recv_data);
|
||||
|
||||
void HandleUpdateAccountData(WorldPacket& recvPacket);
|
||||
void HandleRequestAccountData(WorldPacket& recvPacket);
|
||||
@@ -378,21 +378,21 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
//void HandleGroupCancelOpcode(WorldPacket& recvPacket);
|
||||
void HandleGroupAcceptOpcode(WorldPacket& recvPacket);
|
||||
void HandleGroupDeclineOpcode(WorldPacket& recvPacket);
|
||||
void HandleGroupUninviteNameOpcode(WorldPacket& recvPacket);
|
||||
void HandleGroupUninviteOpcode(WorldPacket& recvPacket);
|
||||
void HandleGroupUninviteGuidOpcode(WorldPacket& recvPacket);
|
||||
void HandleGroupSetLeaderOpcode(WorldPacket& recvPacket);
|
||||
void HandleGroupLeaveOpcode(WorldPacket& recvPacket);
|
||||
void HandleGroupPassOnLootOpcode( WorldPacket &recv_data );
|
||||
void HandleGroupDisbandOpcode(WorldPacket& recvPacket);
|
||||
void HandleOptOutOfLootOpcode( WorldPacket &recv_data );
|
||||
void HandleLootMethodOpcode(WorldPacket& recvPacket);
|
||||
void HandleLootRoll( WorldPacket &recv_data );
|
||||
void HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data );
|
||||
void HandleRaidIconTargetOpcode( WorldPacket & recv_data );
|
||||
void HandleRaidTargetUpdateOpcode( WorldPacket & recv_data );
|
||||
void HandleRaidReadyCheckOpcode( WorldPacket & recv_data );
|
||||
void HandleRaidReadyCheckFinishOpcode( WorldPacket & recv_data );
|
||||
void HandleRaidConvertOpcode( WorldPacket & recv_data );
|
||||
void HandleRaidReadyCheckFinishedOpcode( WorldPacket & recv_data );
|
||||
void HandleGroupRaidConvertOpcode( WorldPacket & recv_data );
|
||||
void HandleGroupChangeSubGroupOpcode( WorldPacket & recv_data );
|
||||
void HandleGroupAssistantOpcode( WorldPacket & recv_data );
|
||||
void HandleGroupPromoteOpcode( WorldPacket & recv_data );
|
||||
void HandleGroupAssistantLeaderOpcode( WorldPacket & recv_data );
|
||||
void HandlePartyAssignmentOpcode( WorldPacket & recv_data );
|
||||
|
||||
void HandlePetitionBuyOpcode(WorldPacket& recv_data);
|
||||
void HandlePetitionShowSignOpcode(WorldPacket& recv_data);
|
||||
@@ -410,7 +410,7 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleGuildAcceptOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildDeclineOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildInfoOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildEventLogOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildEventLogQueryOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildRosterOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildPromoteOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildDemoteOpcode(WorldPacket& recvPacket);
|
||||
@@ -423,14 +423,14 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleGuildRankOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildAddRankOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildDelRankOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildChangeInfoOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildSaveEmblemOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket);
|
||||
void HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket);
|
||||
|
||||
void HandleTaxiNodeStatusQueryOpcode(WorldPacket& recvPacket);
|
||||
void HandleTaxiQueryAvailableNodes(WorldPacket& recvPacket);
|
||||
void HandleActivateTaxiOpcode(WorldPacket& recvPacket);
|
||||
void HandleActivateTaxiFarOpcode(WorldPacket& recvPacket);
|
||||
void HandleTaxiNextDestinationOpcode(WorldPacket& recvPacket);
|
||||
void HandleActivateTaxiExpressOpcode(WorldPacket& recvPacket);
|
||||
void HandleMoveSplineDoneOpcode(WorldPacket& recvPacket);
|
||||
|
||||
void HandleTabardVendorActivateOpcode(WorldPacket& recvPacket);
|
||||
void HandleBankerActivateOpcode(WorldPacket& recvPacket);
|
||||
@@ -473,16 +473,16 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleAuctionPlaceBid( WorldPacket & recv_data );
|
||||
void HandleAuctionListPendingSales( WorldPacket & recv_data );
|
||||
|
||||
void HandleGetMail( WorldPacket & recv_data );
|
||||
void HandleGetMailList( WorldPacket & recv_data );
|
||||
void HandleSendMail( WorldPacket & recv_data );
|
||||
void HandleTakeMoney( WorldPacket & recv_data );
|
||||
void HandleTakeItem( WorldPacket & recv_data );
|
||||
void HandleMarkAsRead( WorldPacket & recv_data );
|
||||
void HandleReturnToSender( WorldPacket & recv_data );
|
||||
void HandleMailTakeMoney( WorldPacket & recv_data );
|
||||
void HandleMailTakeItem( WorldPacket & recv_data );
|
||||
void HandleMailMarkAsRead( WorldPacket & recv_data );
|
||||
void HandleMailReturnToSender( WorldPacket & recv_data );
|
||||
void HandleMailDelete( WorldPacket & recv_data );
|
||||
void HandleItemTextQuery( WorldPacket & recv_data);
|
||||
void HandleMailCreateTextItem(WorldPacket & recv_data );
|
||||
void HandleMsgQueryNextMailtime(WorldPacket & recv_data );
|
||||
void HandleQueryNextMailTime(WorldPacket & recv_data );
|
||||
void HandleCancelChanneling(WorldPacket & recv_data );
|
||||
|
||||
void SendItemPageInfo( ItemPrototype *itemProto );
|
||||
@@ -517,14 +517,14 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleCancelAutoRepeatSpellOpcode(WorldPacket& recvPacket);
|
||||
|
||||
void HandleLearnTalentOpcode(WorldPacket& recvPacket);
|
||||
void HandleTalentWipeOpcode(WorldPacket& recvPacket);
|
||||
void HandleTalentWipeConfirmOpcode(WorldPacket& recvPacket);
|
||||
void HandleUnlearnSkillOpcode(WorldPacket& recvPacket);
|
||||
|
||||
void HandleQuestgiverStatusQueryOpcode(WorldPacket& recvPacket);
|
||||
void HandleQuestgiverStatusQueryMultipleOpcode(WorldPacket& recvPacket);
|
||||
void HandleQuestgiverStatusMultipleQuery(WorldPacket& recvPacket);
|
||||
void HandleQuestgiverHelloOpcode(WorldPacket& recvPacket);
|
||||
void HandleQuestgiverAcceptQuestOpcode(WorldPacket& recvPacket);
|
||||
void HandleQuestgiverQuestQueryOpcode(WorldPacket& recvPacket);
|
||||
void HandleQuestgiverQueryQuestOpcode(WorldPacket& recvPacket);
|
||||
void HandleQuestgiverChooseRewardOpcode(WorldPacket& recvPacket);
|
||||
void HandleQuestgiverRequestRewardOpcode(WorldPacket& recvPacket);
|
||||
void HandleQuestQueryOpcode(WorldPacket& recvPacket);
|
||||
@@ -532,22 +532,22 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleQuestLogSwapQuest(WorldPacket& recv_data );
|
||||
void HandleQuestLogRemoveQuest(WorldPacket& recv_data);
|
||||
void HandleQuestConfirmAccept(WorldPacket& recv_data);
|
||||
void HandleQuestComplete(WorldPacket& recv_data);
|
||||
void HandleQuestAutoLaunch(WorldPacket& recvPacket);
|
||||
void HandleQuestPushToParty(WorldPacket& recvPacket);
|
||||
void HandleQuestgiverCompleteQuest(WorldPacket& recv_data);
|
||||
void HandleQuestgiverQuestAutoLaunch(WorldPacket& recvPacket);
|
||||
void HandlePushQuestToParty(WorldPacket& recvPacket);
|
||||
void HandleQuestPushResult(WorldPacket& recvPacket);
|
||||
|
||||
void HandleMessagechatOpcode(WorldPacket& recvPacket);
|
||||
void HandleTextEmoteOpcode(WorldPacket& recvPacket);
|
||||
void HandleChatIgnoredOpcode(WorldPacket& recvPacket);
|
||||
|
||||
void HandleCorpseReclaimOpcode( WorldPacket& recvPacket );
|
||||
void HandleReclaimCorpseOpcode( WorldPacket& recvPacket );
|
||||
void HandleCorpseQueryOpcode( WorldPacket& recvPacket );
|
||||
void HandleResurrectResponseOpcode(WorldPacket& recvPacket);
|
||||
void HandleSummonResponseOpcode(WorldPacket& recv_data);
|
||||
|
||||
void HandleChannelJoin(WorldPacket& recvPacket);
|
||||
void HandleChannelLeave(WorldPacket& recvPacket);
|
||||
void HandleJoinChannel(WorldPacket& recvPacket);
|
||||
void HandleLeaveChannel(WorldPacket& recvPacket);
|
||||
void HandleChannelList(WorldPacket& recvPacket);
|
||||
void HandleChannelPassword(WorldPacket& recvPacket);
|
||||
void HandleChannelSetOwner(WorldPacket& recvPacket);
|
||||
@@ -560,18 +560,18 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleChannelKick(WorldPacket& recvPacket);
|
||||
void HandleChannelBan(WorldPacket& recvPacket);
|
||||
void HandleChannelUnban(WorldPacket& recvPacket);
|
||||
void HandleChannelAnnounce(WorldPacket& recvPacket);
|
||||
void HandleChannelAnnouncements(WorldPacket& recvPacket);
|
||||
void HandleChannelModerate(WorldPacket& recvPacket);
|
||||
void HandleChannelRosterQuery(WorldPacket& recvPacket);
|
||||
void HandleChannelInfoQuery(WorldPacket& recvPacket);
|
||||
void HandleChannelJoinNotify(WorldPacket& recvPacket);
|
||||
void HandleChannelDeclineInvite(WorldPacket& recvPacket);
|
||||
void HandleChannelDisplayListQuery(WorldPacket& recvPacket);
|
||||
void HandleGetChannelMemberCount(WorldPacket& recvPacket);
|
||||
void HandleSetChannelWatch(WorldPacket& recvPacket);
|
||||
|
||||
void HandleCompleteCinema(WorldPacket& recvPacket);
|
||||
void HandleCompleteCinematic(WorldPacket& recvPacket);
|
||||
void HandleNextCinematicCamera(WorldPacket& recvPacket);
|
||||
|
||||
void HandlePageQuerySkippedOpcode(WorldPacket& recvPacket);
|
||||
void HandlePageQueryOpcode(WorldPacket& recvPacket);
|
||||
void HandlePageTextQueryOpcode(WorldPacket& recvPacket);
|
||||
|
||||
void HandleTutorialFlag ( WorldPacket & recv_data );
|
||||
void HandleTutorialClear( WorldPacket & recv_data );
|
||||
@@ -590,24 +590,24 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandlePetCastSpellOpcode( WorldPacket& recvPacket );
|
||||
void HandlePetLearnTalent( WorldPacket& recvPacket );
|
||||
|
||||
void HandleSetActionBar(WorldPacket& recv_data);
|
||||
void HandleSetActionBarToggles(WorldPacket& recv_data);
|
||||
|
||||
void HandleChangePlayerNameOpcode(WorldPacket& recv_data);
|
||||
void HandleCharRenameOpcode(WorldPacket& recv_data);
|
||||
static void HandleChangePlayerNameOpcodeCallBack(QueryResult *result, uint32 accountId, std::string newname);
|
||||
void HandleDeclinedPlayerNameOpcode(WorldPacket& recv_data);
|
||||
void HandleSetPlayerDeclinedNames(WorldPacket& recv_data);
|
||||
|
||||
void HandleTotemDestroy(WorldPacket& recv_data);
|
||||
void HandleTotemDestroyed(WorldPacket& recv_data);
|
||||
|
||||
//BattleGround
|
||||
void HandleBattleGroundHelloOpcode(WorldPacket &recv_data);
|
||||
void HandleBattleGroundJoinOpcode(WorldPacket &recv_data);
|
||||
void HandleBattlemasterHelloOpcode(WorldPacket &recv_data);
|
||||
void HandleBattlemasterJoinOpcode(WorldPacket &recv_data);
|
||||
void HandleBattleGroundPlayerPositionsOpcode(WorldPacket& recv_data);
|
||||
void HandleBattleGroundPVPlogdataOpcode( WorldPacket &recv_data );
|
||||
void HandleBattleGroundPlayerPortOpcode( WorldPacket &recv_data );
|
||||
void HandleBattleGroundListOpcode( WorldPacket &recv_data );
|
||||
void HandleBattleGroundLeaveOpcode( WorldPacket &recv_data );
|
||||
void HandleBattleGroundArenaJoin( WorldPacket &recv_data );
|
||||
void HandleBattleGroundReportAFK( WorldPacket &recv_data );
|
||||
void HandlePVPLogDataOpcode( WorldPacket &recv_data );
|
||||
void HandleBattleFieldPortOpcode( WorldPacket &recv_data );
|
||||
void HandleBattlefieldListOpcode( WorldPacket &recv_data );
|
||||
void HandleLeaveBattlefieldOpcode( WorldPacket &recv_data );
|
||||
void HandleBattlemasterJoinArena( WorldPacket &recv_data );
|
||||
void HandleReportPvPAFK( WorldPacket &recv_data );
|
||||
|
||||
void HandleWardenDataOpcode(WorldPacket& recv_data);
|
||||
void HandleWorldTeleportOpcode(WorldPacket& recv_data);
|
||||
@@ -615,64 +615,64 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleRandomRollOpcode(WorldPacket& recv_data);
|
||||
void HandleFarSightOpcode(WorldPacket& recv_data);
|
||||
void HandleSetLfgOpcode(WorldPacket& recv_data);
|
||||
void HandleDungeonDifficultyOpcode(WorldPacket& recv_data);
|
||||
void HandleMoveFlyModeChangeAckOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgAutoJoinOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgCancelAutoJoinOpcode(WorldPacket& recv_data);
|
||||
void HandleLfmAutoAddMembersOpcode(WorldPacket& recv_data);
|
||||
void HandleLfmCancelAutoAddmembersOpcode(WorldPacket& recv_data);
|
||||
void HandleSetDungeonDifficultyOpcode(WorldPacket& recv_data);
|
||||
void HandleMoveSetCanFlyAckOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgSetAutoJoinOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgClearAutoJoinOpcode(WorldPacket& recv_data);
|
||||
void HandleLfmSetAutoFillOpcode(WorldPacket& recv_data);
|
||||
void HandleLfmClearAutoFillOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgClearOpcode(WorldPacket& recv_data);
|
||||
void HandleLfmSetNoneOpcode(WorldPacket& recv_data);
|
||||
void HandleLfmSetOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgSetCommentOpcode(WorldPacket& recv_data);
|
||||
void HandleChooseTitleOpcode(WorldPacket& recv_data);
|
||||
void HandleRealmStateRequestOpcode(WorldPacket& recv_data);
|
||||
void HandleLfmClearOpcode(WorldPacket& recv_data);
|
||||
void HandleSetLfmOpcode(WorldPacket& recv_data);
|
||||
void HandleSetLfgCommentOpcode(WorldPacket& recv_data);
|
||||
void HandleSetTitleOpcode(WorldPacket& recv_data);
|
||||
void HandleRealmSplitOpcode(WorldPacket& recv_data);
|
||||
void HandleTimeSyncResp(WorldPacket& recv_data);
|
||||
void HandleWhoisOpcode(WorldPacket& recv_data);
|
||||
void HandleResetInstancesOpcode(WorldPacket& recv_data);
|
||||
|
||||
// Arena Team
|
||||
void HandleInspectArenaStatsOpcode(WorldPacket& recv_data);
|
||||
void HandleInspectArenaTeamsOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamQueryOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamRosterOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamAddMemberOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamInviteAcceptOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamInviteDeclineOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamInviteOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamAcceptOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamDeclineOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamLeaveOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamRemoveFromTeamOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamRemoveOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamDisbandOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamPromoteToCaptainOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamLeaderOpcode(WorldPacket& recv_data);
|
||||
|
||||
void HandleAreaSpiritHealerQueryOpcode(WorldPacket& recv_data);
|
||||
void HandleAreaSpiritHealerQueueOpcode(WorldPacket& recv_data);
|
||||
void HandleDismountOpcode(WorldPacket& recv_data);
|
||||
void HandleCancelMountAuraOpcode(WorldPacket& recv_data);
|
||||
void HandleSelfResOpcode(WorldPacket& recv_data);
|
||||
void HandleReportSpamOpcode(WorldPacket& recv_data);
|
||||
void HandleComplainOpcode(WorldPacket& recv_data);
|
||||
void HandleRequestPetInfoOpcode(WorldPacket& recv_data);
|
||||
|
||||
// Socket gem
|
||||
void HandleSocketOpcode(WorldPacket& recv_data);
|
||||
|
||||
void HandleCancelTempItemEnchantmentOpcode(WorldPacket& recv_data);
|
||||
void HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data);
|
||||
|
||||
void HandleChannelEnableVoiceOpcode(WorldPacket & recv_data);
|
||||
void HandleVoiceSettingsOpcode(WorldPacket& recv_data);
|
||||
void HandleChannelVoiceChatQuery(WorldPacket& recv_data);
|
||||
void HandleChannelVoiceOnOpcode(WorldPacket & recv_data);
|
||||
void HandleVoiceSessionEnableOpcode(WorldPacket& recv_data);
|
||||
void HandleSetActiveVoiceChannel(WorldPacket& recv_data);
|
||||
void HandleSetTaxiBenchmarkOpcode(WorldPacket& recv_data);
|
||||
|
||||
// Guild Bank
|
||||
void HandleGuildBankGetRights(WorldPacket& recv_data);
|
||||
void HandleGuildBankGetMoneyAmount(WorldPacket& recv_data);
|
||||
void HandleGuildBankQuery(WorldPacket& recv_data);
|
||||
void HandleGuildBankTabColon(WorldPacket& recv_data);
|
||||
void HandleGuildBankLog(WorldPacket& recv_data);
|
||||
void HandleGuildBankDeposit(WorldPacket& recv_data);
|
||||
void HandleGuildBankWithdraw(WorldPacket& recv_data);
|
||||
void HandleGuildBankDepositItem(WorldPacket& recv_data);
|
||||
void HandleGuildBankModifyTab(WorldPacket& recv_data);
|
||||
void HandleGuildPermissions(WorldPacket& recv_data);
|
||||
void HandleGuildBankMoneyWithdrawn(WorldPacket& recv_data);
|
||||
void HandleGuildBankerActivate(WorldPacket& recv_data);
|
||||
void HandleGuildBankQueryTab(WorldPacket& recv_data);
|
||||
void HandleGuildBankLogQuery(WorldPacket& recv_data);
|
||||
void HandleGuildBankDepositMoney(WorldPacket& recv_data);
|
||||
void HandleGuildBankWithdrawMoney(WorldPacket& recv_data);
|
||||
void HandleGuildBankSwapItems(WorldPacket& recv_data);
|
||||
void HandleGuildBankUpdateTab(WorldPacket& recv_data);
|
||||
void HandleGuildBankBuyTab(WorldPacket& recv_data);
|
||||
void HandleGuildBankTabText(WorldPacket& recv_data);
|
||||
void HandleGuildBankSetTabText(WorldPacket& recv_data);
|
||||
void HandleQueryGuildBankTabText(WorldPacket& recv_data);
|
||||
void HandleSetGuildBankTabText(WorldPacket& recv_data);
|
||||
|
||||
// Calendar
|
||||
void HandleCalendarGetCalendar(WorldPacket& recv_data);
|
||||
@@ -695,7 +695,7 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleAlterAppearance(WorldPacket& recv_data);
|
||||
void HandleRemoveGlyph(WorldPacket& recv_data);
|
||||
void HandleCharCustomize(WorldPacket& recv_data);
|
||||
void HandleInspectAchievements(WorldPacket& recv_data);
|
||||
void HandleQueryInspectAchievements(WorldPacket& recv_data);
|
||||
private:
|
||||
// private trade methods
|
||||
void moveItems(Item* myItems[], Item* hisItems[]);
|
||||
|
||||
@@ -87,63 +87,65 @@ namespace VMAP
|
||||
bool CoordModelMapping::readCoordinateMapping(const std::string& pDirectoryFileName)
|
||||
{
|
||||
FILE *f = fopen(pDirectoryFileName.c_str(), "rb");
|
||||
bool result = false;
|
||||
if(!f)
|
||||
{
|
||||
printf("ERROR: Can't open file: %s\n",pDirectoryFileName.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
char buffer[500+1];
|
||||
|
||||
if(f)
|
||||
CMappingEntry* cMappingEntry;
|
||||
while(fgets(buffer, 500, f))
|
||||
{
|
||||
result = true;
|
||||
CMappingEntry* cMappingEntry;
|
||||
while(fgets(buffer, 500, f))
|
||||
//char namebuffer[500];
|
||||
char positionbuffer[500];
|
||||
int xpos, ypos, noVec;
|
||||
float scale;
|
||||
xpos = ypos = noVec = 0;
|
||||
|
||||
//sscanf(buffer, "%d %d %s %s %f %d", &xpos, &ypos, namebuffer,positionbuffer, &scale, &noVec);
|
||||
|
||||
// this is ugly, but the format has no read delimiter and a space could be in the first part of the name
|
||||
int nameStart = findPosChar(buffer, ' ', 2);// find the 2. space
|
||||
if(nameStart > -1 && (iFilterMethod == NULL || (*iFilterMethod)(buffer)))
|
||||
{
|
||||
//char namebuffer[500];
|
||||
char positionbuffer[500];
|
||||
int xpos, ypos, noVec;
|
||||
float scale;
|
||||
xpos = ypos = noVec = 0;
|
||||
++nameStart;
|
||||
// find the 1. / (now a space only can be found at the end of the name)
|
||||
int nameEnd = nameStart + findPosChar(&buffer[nameStart], '/', 1);
|
||||
// find the 1. space (after the name)
|
||||
nameEnd += findPosChar(&buffer[nameEnd], ' ', 1);
|
||||
buffer[nameEnd] = 0; // terminate the name
|
||||
|
||||
//sscanf(buffer, "%d %d %s %s %f %d", &xpos, &ypos, namebuffer,positionbuffer, &scale, &noVec);
|
||||
|
||||
// this is ugly, but the format has no read delimiter and a space could be in the first part of the name
|
||||
int nameStart = findPosChar(buffer, ' ', 2);// find the 2. space
|
||||
if(nameStart > -1 && (iFilterMethod == NULL || (*iFilterMethod)(buffer)))
|
||||
sscanf(buffer, "%d %d", &xpos, &ypos);
|
||||
sscanf(&buffer[nameEnd+1], "%s %f %d", positionbuffer, &scale, &noVec);
|
||||
unsigned int mapId = getMapIdFromFilename(std::string(&buffer[nameStart]));
|
||||
if(!iMapIds.contains(mapId))
|
||||
{
|
||||
++nameStart;
|
||||
// find the 1. / (now a space only can be found at the end of the name)
|
||||
int nameEnd = nameStart + findPosChar(&buffer[nameStart], '/', 1);
|
||||
// find the 1. space (after the name)
|
||||
nameEnd += findPosChar(&buffer[nameEnd], ' ', 1);
|
||||
buffer[nameEnd] = 0; // terminate the name
|
||||
|
||||
sscanf(buffer, "%d %d", &xpos, &ypos);
|
||||
sscanf(&buffer[nameEnd+1], "%s %f %d", positionbuffer, &scale, &noVec);
|
||||
unsigned int mapId = getMapIdFromFilename(std::string(&buffer[nameStart]));
|
||||
if(!iMapIds.contains(mapId))
|
||||
{
|
||||
iMapIds.append(mapId);
|
||||
}
|
||||
if(!isWorldAreaMap(mapId))
|
||||
{
|
||||
xpos = 0; // store all files under the groupKey
|
||||
ypos = 0;
|
||||
}
|
||||
|
||||
std::string key = CMappingEntry::getKeyString(mapId, xpos, ypos);
|
||||
cMappingEntry = getCMappingEntry(key);
|
||||
if(cMappingEntry == 0)
|
||||
{
|
||||
cMappingEntry = new CMappingEntry(mapId, xpos, ypos);
|
||||
addCMappingEntry(cMappingEntry);
|
||||
}
|
||||
char namebuffer2[500];
|
||||
sprintf(namebuffer2, "%d %s#%s_%f", noVec, &buffer[nameStart], positionbuffer, scale);
|
||||
cMappingEntry->addFilename(namebuffer2);
|
||||
//break;
|
||||
iMapIds.append(mapId);
|
||||
printf("Coords for map %u...\n",mapId);
|
||||
}
|
||||
if(!isWorldAreaMap(mapId))
|
||||
{
|
||||
xpos = 0; // store all files under the groupKey
|
||||
ypos = 0;
|
||||
}
|
||||
|
||||
std::string key = CMappingEntry::getKeyString(mapId, xpos, ypos);
|
||||
cMappingEntry = getCMappingEntry(key);
|
||||
if(cMappingEntry == 0)
|
||||
{
|
||||
cMappingEntry = new CMappingEntry(mapId, xpos, ypos);
|
||||
addCMappingEntry(cMappingEntry);
|
||||
}
|
||||
char namebuffer2[500];
|
||||
sprintf(namebuffer2, "%d %s#%s_%f", noVec, &buffer[nameStart], positionbuffer, scale);
|
||||
cMappingEntry->addFilename(namebuffer2);
|
||||
//break;
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
return result;
|
||||
fclose(f);
|
||||
return true;
|
||||
}
|
||||
|
||||
//============================================================
|
||||
|
||||
+414
-407
@@ -150,447 +150,454 @@ namespace VMAP
|
||||
# endif
|
||||
#endif
|
||||
|
||||
bool result = true;
|
||||
std::string fname = iSrcDir;
|
||||
fname.append("/");
|
||||
fname.append("dir");
|
||||
iCoordModelMapping->setModelNameFilterMethod(iFilterMethod);
|
||||
iCoordModelMapping->readCoordinateMapping(fname);
|
||||
|
||||
printf("Read coordinate mapping...\n");
|
||||
if(!iCoordModelMapping->readCoordinateMapping(fname))
|
||||
return false;
|
||||
|
||||
Array<unsigned int> mapIds = iCoordModelMapping->getMaps();
|
||||
if(mapIds.size() == 0)
|
||||
{
|
||||
result = false;
|
||||
printf("Fatal error: empty map list!\n");
|
||||
return false;
|
||||
}
|
||||
for(int i=0; i<mapIds.size() && result; ++i)
|
||||
|
||||
for(int i=0; i<mapIds.size(); ++i)
|
||||
{
|
||||
unsigned int mapId = mapIds[i];
|
||||
|
||||
#ifdef _ASSEMBLER_DEBUG
|
||||
if(mapId == 0) // "Azeroth" just for debug
|
||||
{
|
||||
for(int x=28; x<29 && result; ++x) //debug
|
||||
for(int x=28; x<29; ++x) //debug
|
||||
{
|
||||
for(int y=28; y<29 && result; ++y)
|
||||
for(int y=28; y<29; ++y)
|
||||
{
|
||||
#else
|
||||
// ignore DeeprunTram (369) it is too large for short vector and not important
|
||||
// ignore test (13), Test (29) , development (451)
|
||||
if(mapId != 369 && mapId != 13 && mapId != 29 && mapId != 451)
|
||||
{
|
||||
for(int x=0; x<66 && result; ++x)
|
||||
{
|
||||
for(int y=0; y<66 && result; ++y)
|
||||
{
|
||||
#endif
|
||||
Array<ModelContainer*> mc;
|
||||
std::string dirname;
|
||||
char buffer[100];
|
||||
if(iCoordModelMapping->isWorldAreaMap(mapId) && x<65 && y<65)
|
||||
{
|
||||
sprintf(buffer, "%03u_%d_%d",mapId,y,x); // Let's flip x and y here
|
||||
dirname = std::string(buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(buffer, "%03u",mapId);
|
||||
dirname = std::string(buffer);
|
||||
}
|
||||
result = fillModelContainerArray(dirname, mapId, x, y, mc);
|
||||
emptyArray(mc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef _ASSEMBLER_DEBUG
|
||||
if(::g_df) fclose(::g_df);
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
|
||||
bool TileAssembler::fillModelContainerArray(const std::string& pDirFileName, unsigned int pMapId, int pXPos, int pYPos, Array<ModelContainer*>& pMC)
|
||||
#else
|
||||
// ignore DeeprunTram (369) it is too large for short vector and not important
|
||||
// ignore test (13), Test (29) , development (451)
|
||||
if(mapId != 369 && mapId != 13 && mapId != 29 && mapId != 451)
|
||||
{
|
||||
for(int x=0; x<66; ++x)
|
||||
{
|
||||
bool result = true;
|
||||
ModelContainer* modelContainer;
|
||||
|
||||
NameCollection nameCollection = iCoordModelMapping->getFilenamesForCoordinate(pMapId, pXPos, pYPos);
|
||||
if(nameCollection.size() > 0)
|
||||
for(int y=0; y<66; ++y)
|
||||
{
|
||||
result = false;
|
||||
char dirfilename[500];
|
||||
sprintf(dirfilename,"%s/%s.vmdir",iDestDir.c_str(),pDirFileName.c_str());
|
||||
FILE *dirfile = fopen(dirfilename, "ab");
|
||||
if(dirfile)
|
||||
#endif
|
||||
Array<ModelContainer*> mc;
|
||||
std::string dirname;
|
||||
char buffer[100];
|
||||
if(iCoordModelMapping->isWorldAreaMap(mapId) && x<65 && y<65)
|
||||
{
|
||||
result = true;
|
||||
char destnamebuffer[500];
|
||||
char fullnamedestnamebuffer[500];
|
||||
if(nameCollection.iMainFiles.size() >0)
|
||||
{
|
||||
sprintf(destnamebuffer,"%03u_%i_%i.vmap",pMapId, pYPos, pXPos); // flip it here too
|
||||
std::string checkDoubleStr = std::string(dirfilename);
|
||||
checkDoubleStr.append("##");
|
||||
checkDoubleStr.append(std::string(destnamebuffer));
|
||||
// Check, if same file already is in the same dir file
|
||||
if(!iCoordModelMapping->isAlreadyProcessedSingleFile(checkDoubleStr))
|
||||
{
|
||||
iCoordModelMapping->addAlreadyProcessedSingleFile(checkDoubleStr);
|
||||
fprintf(dirfile, "%s\n",destnamebuffer);
|
||||
sprintf(fullnamedestnamebuffer,"%s/%s",iDestDir.c_str(),destnamebuffer);
|
||||
modelContainer = processNames(nameCollection.iMainFiles, fullnamedestnamebuffer);
|
||||
if(modelContainer)
|
||||
{
|
||||
pMC.append(modelContainer);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// process the large singe files
|
||||
int pos = 0;
|
||||
while(result && (pos < nameCollection.iSingeFiles.size()))
|
||||
{
|
||||
std::string destFileName = iDestDir;
|
||||
destFileName.append("/");
|
||||
std::string dirEntryName = getDirEntryNameFromModName(pMapId,nameCollection.iSingeFiles[pos]);
|
||||
std::string checkDoubleStr = std::string(dirfilename);
|
||||
checkDoubleStr.append("##");
|
||||
checkDoubleStr.append(nameCollection.iSingeFiles[pos]);
|
||||
// Check, if same file already is in the same dir file
|
||||
if(!iCoordModelMapping->isAlreadyProcessedSingleFile(checkDoubleStr))
|
||||
{
|
||||
iCoordModelMapping->addAlreadyProcessedSingleFile(checkDoubleStr);
|
||||
fprintf(dirfile, "%s\n",dirEntryName.c_str());
|
||||
destFileName.append(dirEntryName);
|
||||
|
||||
Array<std::string> positionarray;
|
||||
positionarray.append(nameCollection.iSingeFiles[pos]);
|
||||
|
||||
if(!iCoordModelMapping->isAlreadyProcessedSingleFile(nameCollection.iSingeFiles[pos]))
|
||||
{
|
||||
modelContainer = processNames(positionarray, destFileName.c_str());
|
||||
iCoordModelMapping->addAlreadyProcessedSingleFile(nameCollection.iSingeFiles[pos]);
|
||||
if(modelContainer)
|
||||
{
|
||||
pMC.append(modelContainer);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
++pos;
|
||||
}
|
||||
fclose(dirfile);
|
||||
}
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
|
||||
void removeEntriesFromTree(AABSPTree<SubModel *>* pTree)
|
||||
{
|
||||
Array<SubModel *> submodelArray;
|
||||
pTree->getMembers(submodelArray);
|
||||
int no = submodelArray.size();
|
||||
while(no > 0)
|
||||
{
|
||||
--no;
|
||||
delete submodelArray[no];
|
||||
}
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
|
||||
ModelContainer* TileAssembler::processNames(const Array<std::string>& pPositions, const char* pDestFileName)
|
||||
{
|
||||
ModelContainer *modelContainer = 0;
|
||||
|
||||
Vector3 basepos = Vector3(0,0,0);
|
||||
AABSPTree<SubModel *>* mainTree = new AABSPTree<SubModel *>();
|
||||
|
||||
int pos = 0;
|
||||
|
||||
bool result = true;
|
||||
while(result && (pos < pPositions.size()))
|
||||
{
|
||||
std::string modelPosString = pPositions[pos];
|
||||
std::string modelFileName = getModNameFromModPosName(modelPosString);
|
||||
|
||||
if(!fillModelIntoTree(mainTree, basepos, modelPosString, modelFileName))
|
||||
{
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
++pos;
|
||||
}
|
||||
if(result && mainTree->size() > 0)
|
||||
{
|
||||
mainTree->balance();
|
||||
modelContainer = new ModelContainer(mainTree);
|
||||
modelContainer->writeFile(pDestFileName);
|
||||
}
|
||||
removeEntriesFromTree(mainTree);
|
||||
|
||||
delete mainTree;
|
||||
|
||||
return(modelContainer);
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
bool TileAssembler::readRawFile(std::string& pModelFilename, ModelPosition& pModelPosition, AABSPTree<SubModel *> *pMainTree)
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
std::string filename = iSrcDir;
|
||||
if(filename.length() >0)
|
||||
filename.append("/");
|
||||
filename.append(pModelFilename);
|
||||
FILE *rf = fopen(filename.c_str(), "rb");
|
||||
if(!rf)
|
||||
{
|
||||
// depending on the extractor version, the data could be located in the root dir
|
||||
std::string baseModelFilename = pModelFilename.substr((pModelFilename.find_first_of("/")+1),pModelFilename.length());
|
||||
filename = iSrcDir;
|
||||
if(filename.length() >0)
|
||||
filename.append("/");
|
||||
filename.append(baseModelFilename);
|
||||
rf = fopen(filename.c_str(), "rb");
|
||||
}
|
||||
char ident[8];
|
||||
|
||||
int trianglecount =0;
|
||||
|
||||
#ifdef _ASSEMBLER_DEBUG
|
||||
int startgroup = 0; //2;
|
||||
int endgroup = INT_MAX; //2;
|
||||
fprintf(::g_df,"-------------------------------------------------\n");
|
||||
fprintf(::g_df,"%s\n", pModelFilename.c_str());
|
||||
fprintf(::g_df,"-------------------------------------------------\n");
|
||||
#else
|
||||
int startgroup = 0;
|
||||
int endgroup = INT_MAX;
|
||||
#endif
|
||||
|
||||
// temporary use defines to simplify read/check code (close file and return at fail)
|
||||
#define READ_OR_RETURN(V,S) if(fread((V), (S), 1, rf) != 1) { fclose(rf); return(false); }
|
||||
#define CMP_OR_RETURN(V,S) if(strcmp((V),(S)) != 0) { fclose(rf); return(false); }
|
||||
|
||||
if(rf)
|
||||
{
|
||||
READ_OR_RETURN(&ident, 8);
|
||||
if(strcmp(ident, "VMAP001") == 0)
|
||||
{
|
||||
// OK, do nothing
|
||||
}
|
||||
else if(strcmp(ident, "VMAP002") == 0)
|
||||
{
|
||||
// we have to read one int. This is needed during the export and we have to skip it here
|
||||
int tempNVectors;
|
||||
READ_OR_RETURN(&tempNVectors, sizeof(int));
|
||||
|
||||
sprintf(buffer, "%03u_%d_%d",mapId,y,x); // Let's flip x and y here
|
||||
dirname = std::string(buffer);
|
||||
printf("%s...\n",dirname.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
// wrong version
|
||||
fclose(rf);
|
||||
return(false);
|
||||
sprintf(buffer, "%03u",mapId);
|
||||
dirname = std::string(buffer);
|
||||
|
||||
// prevent spam for small maps
|
||||
if(x==0 && y==0)
|
||||
printf("%s...\n",dirname.c_str());
|
||||
}
|
||||
G3D::uint32 groups;
|
||||
char blockId[5];
|
||||
blockId[4] = 0;
|
||||
int blocksize;
|
||||
|
||||
READ_OR_RETURN(&groups, sizeof(G3D::uint32));
|
||||
bool result = fillModelContainerArray(dirname, mapId, x, y, mc);
|
||||
emptyArray(mc);
|
||||
|
||||
for(int g=0;g<(int)groups;g++)
|
||||
{
|
||||
// group MUST NOT have more then 65536 indexes !! Array will have a problem with that !! (strange ...)
|
||||
Array<int> tempIndexArray;
|
||||
Array<Vector3> tempVertexArray;
|
||||
|
||||
AABSPTree<Triangle> *gtree = new AABSPTree<Triangle>();
|
||||
|
||||
// add free gtree at fail
|
||||
#undef READ_OR_RETURN
|
||||
#undef CMP_OR_RETURN
|
||||
#define READ_OR_RETURN(V,S) if(fread((V), (S), 1, rf) != 1) { fclose(rf); delete gtree; return(false); }
|
||||
#define CMP_OR_RETURN(V,S) if(strcmp((V),(S)) != 0) { fclose(rf); delete gtree; return(false); }
|
||||
|
||||
G3D::uint32 flags;
|
||||
READ_OR_RETURN(&flags, sizeof(G3D::uint32));
|
||||
|
||||
G3D::uint32 branches;
|
||||
READ_OR_RETURN(&blockId, 4);
|
||||
CMP_OR_RETURN(blockId, "GRP ");
|
||||
READ_OR_RETURN(&blocksize, sizeof(int));
|
||||
READ_OR_RETURN(&branches, sizeof(G3D::uint32));
|
||||
for(int b=0;b<(int)branches; b++)
|
||||
{
|
||||
G3D::uint32 indexes;
|
||||
// indexes for each branch (not used jet)
|
||||
READ_OR_RETURN(&indexes, sizeof(G3D::uint32));
|
||||
}
|
||||
|
||||
// ---- indexes
|
||||
READ_OR_RETURN(&blockId, 4);
|
||||
CMP_OR_RETURN(blockId, "INDX");
|
||||
READ_OR_RETURN(&blocksize, sizeof(int));
|
||||
unsigned int nindexes;
|
||||
READ_OR_RETURN(&nindexes, sizeof(G3D::uint32));
|
||||
if(nindexes >0)
|
||||
{
|
||||
unsigned short *indexarray = new unsigned short[nindexes*sizeof(unsigned short)];
|
||||
READ_OR_RETURN(indexarray, sizeof(unsigned short));
|
||||
for(int i=0;i<(int)nindexes; i++)
|
||||
{
|
||||
unsigned short val = indexarray[i];
|
||||
tempIndexArray.append(val);
|
||||
}
|
||||
delete[] indexarray;
|
||||
}
|
||||
|
||||
// ---- vectors
|
||||
READ_OR_RETURN(&blockId, 4);
|
||||
CMP_OR_RETURN(blockId, "VERT");
|
||||
READ_OR_RETURN(&blocksize, sizeof(int));
|
||||
unsigned int nvectors;
|
||||
READ_OR_RETURN(&nvectors, sizeof(int));
|
||||
|
||||
float *vectorarray = 0;
|
||||
|
||||
// add vectorarray free
|
||||
#undef READ_OR_RETURN
|
||||
#undef CMP_OR_RETURN
|
||||
#define READ_OR_RETURN(V,S) if(fread((V), (S), 1, rf) != 1) { fclose(rf); delete gtree; delete[] vectorarray; return(false); }
|
||||
#define CMP_OR_RETURN(V,S) if(strcmp((V),(S)) != 0) { fclose(rf); delete gtree; delete[] vectorarray; return(false); }
|
||||
|
||||
if(nvectors >0)
|
||||
{
|
||||
vectorarray = new float[nvectors*sizeof(float)*3];
|
||||
READ_OR_RETURN(vectorarray, sizeof(float)*3);
|
||||
}
|
||||
// ----- liquit
|
||||
if(flags & 1)
|
||||
{
|
||||
// we have liquit -> not handled yet ... skip
|
||||
READ_OR_RETURN(&blockId, 4);
|
||||
CMP_OR_RETURN(blockId, "LIQU");
|
||||
READ_OR_RETURN(&blocksize, sizeof(int));
|
||||
fseek(rf, blocksize, SEEK_CUR);
|
||||
}
|
||||
|
||||
|
||||
for(unsigned int i=0, indexNo=0; indexNo<nvectors; indexNo++)
|
||||
{
|
||||
Vector3 v = Vector3(vectorarray[i+2], vectorarray[i+1], vectorarray[i+0]);
|
||||
i+=3;
|
||||
v = pModelPosition.transform(v);
|
||||
|
||||
float swapy = v.y;
|
||||
v.y = v.x;
|
||||
v.x = swapy;
|
||||
|
||||
tempVertexArray.append(v);
|
||||
}
|
||||
|
||||
// ---- calculate triangles
|
||||
int rest = nindexes%3;
|
||||
if(rest != 0)
|
||||
{
|
||||
nindexes -= rest;
|
||||
}
|
||||
|
||||
for(unsigned int i=0;i<(nindexes);)
|
||||
{
|
||||
Triangle t = Triangle(tempVertexArray[tempIndexArray[i+2]], tempVertexArray[tempIndexArray[i+1]], tempVertexArray[tempIndexArray[i+0]] );
|
||||
i+=3;
|
||||
++trianglecount;
|
||||
if(g>= startgroup && g <= endgroup)
|
||||
{
|
||||
gtree->insert(t);
|
||||
}
|
||||
}
|
||||
|
||||
// drop of temporary use defines
|
||||
#undef READ_OR_RETURN
|
||||
#undef CMP_OR_RETURN
|
||||
|
||||
if(vectorarray != 0)
|
||||
{
|
||||
delete vectorarray;
|
||||
}
|
||||
|
||||
if(gtree->size() >0)
|
||||
{
|
||||
gtree->balance();
|
||||
SubModel *sm = new SubModel(gtree);
|
||||
#ifdef _ASSEMBLER_DEBUG
|
||||
if(::g_df) fprintf(::g_df,"group trianglies: %d, Tris: %d, Nodes: %d, gtree.triangles: %d\n", g, sm->getNTriangles(), sm->getNNodes(), gtree->memberTable.size());
|
||||
if(sm->getNTriangles() != gtree->memberTable.size())
|
||||
{
|
||||
if(::g_df) fprintf(::g_df,"ERROR !!!! group trianglies: %d, Tris: %d, Nodes: %d, gtree.triangles: %d\n", g, sm->getNTriangles(), sm->getNNodes(), gtree->memberTable.size());
|
||||
}
|
||||
#endif
|
||||
sm->setBasePosition(pModelPosition.iPos);
|
||||
pMainTree->insert(sm);
|
||||
}
|
||||
delete gtree;
|
||||
}
|
||||
fclose(rf);
|
||||
result = true;
|
||||
if(!result)
|
||||
return false;
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef _ASSEMBLER_DEBUG
|
||||
if(::g_df) fclose(::g_df);
|
||||
#endif
|
||||
|
||||
//=================================================================
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TileAssembler::fillModelIntoTree(AABSPTree<SubModel *> *pMainTree, const Vector3& pBasePos, std::string& pPos, std::string& pModelFilename)
|
||||
//=================================================================
|
||||
|
||||
bool TileAssembler::fillModelContainerArray(const std::string& pDirFileName, unsigned int pMapId, int pXPos, int pYPos, Array<ModelContainer*>& pMC)
|
||||
{
|
||||
ModelContainer* modelContainer;
|
||||
|
||||
NameCollection nameCollection = iCoordModelMapping->getFilenamesForCoordinate(pMapId, pXPos, pYPos);
|
||||
if(nameCollection.size() == 0)
|
||||
return true; // no data...
|
||||
|
||||
char dirfilename[500];
|
||||
sprintf(dirfilename,"%s/%s.vmdir",iDestDir.c_str(),pDirFileName.c_str());
|
||||
FILE *dirfile = fopen(dirfilename, "ab");
|
||||
if(!dirfile)
|
||||
{
|
||||
printf("ERROR: Can't create file %s",dirfilename);
|
||||
return false;
|
||||
}
|
||||
|
||||
char destnamebuffer[500];
|
||||
char fullnamedestnamebuffer[500];
|
||||
|
||||
if(nameCollection.iMainFiles.size() >0)
|
||||
{
|
||||
sprintf(destnamebuffer,"%03u_%i_%i.vmap",pMapId, pYPos, pXPos); // flip it here too
|
||||
std::string checkDoubleStr = std::string(dirfilename);
|
||||
checkDoubleStr.append("##");
|
||||
checkDoubleStr.append(std::string(destnamebuffer));
|
||||
// Check, if same file already is in the same dir file
|
||||
if(!iCoordModelMapping->isAlreadyProcessedSingleFile(checkDoubleStr))
|
||||
{
|
||||
iCoordModelMapping->addAlreadyProcessedSingleFile(checkDoubleStr);
|
||||
fprintf(dirfile, "%s\n",destnamebuffer);
|
||||
sprintf(fullnamedestnamebuffer,"%s/%s",iDestDir.c_str(),destnamebuffer);
|
||||
modelContainer = processNames(nameCollection.iMainFiles, fullnamedestnamebuffer);
|
||||
if(modelContainer)
|
||||
pMC.append(modelContainer);
|
||||
else
|
||||
printf("warning: (if) problems in processing data for %s\n",destnamebuffer);
|
||||
}
|
||||
}
|
||||
// process the large singe files
|
||||
int pos = 0;
|
||||
while(pos < nameCollection.iSingeFiles.size())
|
||||
{
|
||||
std::string destFileName = iDestDir;
|
||||
destFileName.append("/");
|
||||
std::string dirEntryName = getDirEntryNameFromModName(pMapId,nameCollection.iSingeFiles[pos]);
|
||||
std::string checkDoubleStr = std::string(dirfilename);
|
||||
checkDoubleStr.append("##");
|
||||
checkDoubleStr.append(nameCollection.iSingeFiles[pos]);
|
||||
// Check, if same file already is in the same dir file
|
||||
if(!iCoordModelMapping->isAlreadyProcessedSingleFile(checkDoubleStr))
|
||||
{
|
||||
iCoordModelMapping->addAlreadyProcessedSingleFile(checkDoubleStr);
|
||||
fprintf(dirfile, "%s\n",dirEntryName.c_str());
|
||||
destFileName.append(dirEntryName);
|
||||
|
||||
Array<std::string> positionarray;
|
||||
positionarray.append(nameCollection.iSingeFiles[pos]);
|
||||
|
||||
if(!iCoordModelMapping->isAlreadyProcessedSingleFile(nameCollection.iSingeFiles[pos]))
|
||||
{
|
||||
bool result = false;
|
||||
ModelPosition modelPosition;
|
||||
getModelPosition(pPos, modelPosition);
|
||||
// all should be relative to object base position
|
||||
modelPosition.moveToBasePos(pBasePos);
|
||||
|
||||
modelPosition.init();
|
||||
|
||||
if(readRawFile(pModelFilename, modelPosition, pMainTree))
|
||||
{
|
||||
result = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
modelContainer = processNames(positionarray, destFileName.c_str());
|
||||
iCoordModelMapping->addAlreadyProcessedSingleFile(nameCollection.iSingeFiles[pos]);
|
||||
if(modelContainer)
|
||||
pMC.append(modelContainer);
|
||||
else
|
||||
printf("warning: (while) problems in processing data for %s\n",destFileName.c_str());
|
||||
}
|
||||
}
|
||||
++pos;
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
void TileAssembler::getModelPosition(std::string& pPosString, ModelPosition& pModelPosition)
|
||||
fclose(dirfile);
|
||||
return true;
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
|
||||
void removeEntriesFromTree(AABSPTree<SubModel *>* pTree)
|
||||
{
|
||||
Array<SubModel *> submodelArray;
|
||||
pTree->getMembers(submodelArray);
|
||||
int no = submodelArray.size();
|
||||
while(no > 0)
|
||||
{
|
||||
--no;
|
||||
delete submodelArray[no];
|
||||
}
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
|
||||
ModelContainer* TileAssembler::processNames(const Array<std::string>& pPositions, const char* pDestFileName)
|
||||
{
|
||||
ModelContainer *modelContainer = 0;
|
||||
|
||||
Vector3 basepos = Vector3(0,0,0);
|
||||
AABSPTree<SubModel *>* mainTree = new AABSPTree<SubModel *>();
|
||||
|
||||
int pos = 0;
|
||||
|
||||
bool result = true;
|
||||
while(result && (pos < pPositions.size()))
|
||||
{
|
||||
std::string modelPosString = pPositions[pos];
|
||||
std::string modelFileName = getModNameFromModPosName(modelPosString);
|
||||
|
||||
if(!fillModelIntoTree(mainTree, basepos, modelPosString, modelFileName))
|
||||
{
|
||||
result = false;
|
||||
break;
|
||||
}
|
||||
++pos;
|
||||
}
|
||||
if(result && mainTree->size() > 0)
|
||||
{
|
||||
mainTree->balance();
|
||||
modelContainer = new ModelContainer(mainTree);
|
||||
modelContainer->writeFile(pDestFileName);
|
||||
}
|
||||
removeEntriesFromTree(mainTree);
|
||||
|
||||
delete mainTree;
|
||||
|
||||
return(modelContainer);
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
bool TileAssembler::readRawFile(std::string& pModelFilename, ModelPosition& pModelPosition, AABSPTree<SubModel *> *pMainTree)
|
||||
{
|
||||
std::string filename = iSrcDir;
|
||||
if(filename.length() >0)
|
||||
filename.append("/");
|
||||
filename.append(pModelFilename);
|
||||
FILE *rf = fopen(filename.c_str(), "rb");
|
||||
if(!rf)
|
||||
{
|
||||
// depending on the extractor version, the data could be located in the root dir
|
||||
std::string baseModelFilename = pModelFilename.substr((pModelFilename.find_first_of("/")+1),pModelFilename.length());
|
||||
filename = iSrcDir;
|
||||
if(filename.length() >0)
|
||||
filename.append("/");
|
||||
filename.append(baseModelFilename);
|
||||
rf = fopen(filename.c_str(), "rb");
|
||||
}
|
||||
|
||||
if(!rf)
|
||||
{
|
||||
printf("ERROR: Can't open model file in form: %s",pModelFilename.c_str());
|
||||
printf("... or form: %s",filename );
|
||||
return false;
|
||||
}
|
||||
|
||||
char ident[8];
|
||||
|
||||
int trianglecount =0;
|
||||
|
||||
#ifdef _ASSEMBLER_DEBUG
|
||||
int startgroup = 0; //2;
|
||||
int endgroup = INT_MAX; //2;
|
||||
fprintf(::g_df,"-------------------------------------------------\n");
|
||||
fprintf(::g_df,"%s\n", pModelFilename.c_str());
|
||||
fprintf(::g_df,"-------------------------------------------------\n");
|
||||
#else
|
||||
int startgroup = 0;
|
||||
int endgroup = INT_MAX;
|
||||
#endif
|
||||
|
||||
// temporary use defines to simplify read/check code (close file and return at fail)
|
||||
#define READ_OR_RETURN(V,S) if(fread((V), (S), 1, rf) != 1) { \
|
||||
fclose(rf); return(false); }
|
||||
#define CMP_OR_RETURN(V,S) if(strcmp((V),(S)) != 0) { \
|
||||
fclose(rf); return(false); }
|
||||
|
||||
READ_OR_RETURN(&ident, 8);
|
||||
if(strcmp(ident, "VMAP001") == 0)
|
||||
{
|
||||
// OK, do nothing
|
||||
}
|
||||
else if(strcmp(ident, "VMAP002") == 0)
|
||||
{
|
||||
// we have to read one int. This is needed during the export and we have to skip it here
|
||||
int tempNVectors;
|
||||
READ_OR_RETURN(&tempNVectors, sizeof(int));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// wrong version
|
||||
fclose(rf);
|
||||
return(false);
|
||||
}
|
||||
G3D::uint32 groups;
|
||||
char blockId[5];
|
||||
blockId[4] = 0;
|
||||
int blocksize;
|
||||
|
||||
READ_OR_RETURN(&groups, sizeof(G3D::uint32));
|
||||
|
||||
for(int g=0;g<(int)groups;g++)
|
||||
{
|
||||
// group MUST NOT have more then 65536 indexes !! Array will have a problem with that !! (strange ...)
|
||||
Array<int> tempIndexArray;
|
||||
Array<Vector3> tempVertexArray;
|
||||
|
||||
AABSPTree<Triangle> *gtree = new AABSPTree<Triangle>();
|
||||
|
||||
// add free gtree at fail
|
||||
#undef READ_OR_RETURN
|
||||
#undef CMP_OR_RETURN
|
||||
#define READ_OR_RETURN(V,S) if(fread((V), (S), 1, rf) != 1) { \
|
||||
fclose(rf); delete gtree; return(false); }
|
||||
#define CMP_OR_RETURN(V,S) if(strcmp((V),(S)) != 0) { \
|
||||
fclose(rf); delete gtree; return(false); }
|
||||
|
||||
G3D::uint32 flags;
|
||||
READ_OR_RETURN(&flags, sizeof(G3D::uint32));
|
||||
|
||||
G3D::uint32 branches;
|
||||
READ_OR_RETURN(&blockId, 4);
|
||||
CMP_OR_RETURN(blockId, "GRP ");
|
||||
READ_OR_RETURN(&blocksize, sizeof(int));
|
||||
READ_OR_RETURN(&branches, sizeof(G3D::uint32));
|
||||
for(int b=0;b<(int)branches; b++)
|
||||
{
|
||||
G3D::uint32 indexes;
|
||||
// indexes for each branch (not used jet)
|
||||
READ_OR_RETURN(&indexes, sizeof(G3D::uint32));
|
||||
}
|
||||
|
||||
// ---- indexes
|
||||
READ_OR_RETURN(&blockId, 4);
|
||||
CMP_OR_RETURN(blockId, "INDX");
|
||||
READ_OR_RETURN(&blocksize, sizeof(int));
|
||||
unsigned int nindexes;
|
||||
READ_OR_RETURN(&nindexes, sizeof(G3D::uint32));
|
||||
if(nindexes >0)
|
||||
{
|
||||
unsigned short *indexarray = new unsigned short[nindexes*sizeof(unsigned short)];
|
||||
READ_OR_RETURN(indexarray, nindexes*sizeof(unsigned short));
|
||||
for(int i=0;i<(int)nindexes; i++)
|
||||
{
|
||||
float vposarray[3];
|
||||
float vdirarray[3];
|
||||
float scale;
|
||||
|
||||
size_t spos = pPosString.find_first_of('#');
|
||||
std::string stripedPosString = pPosString.substr(spos+1,pPosString.length());
|
||||
|
||||
sscanf(stripedPosString.c_str(), "%f,%f,%f_%f,%f,%f_%f",
|
||||
&vposarray[0],&vposarray[1],&vposarray[2],
|
||||
&vdirarray[0],&vdirarray[1],&vdirarray[2],
|
||||
&scale);
|
||||
|
||||
pModelPosition.iPos = Vector3(vposarray[0], vposarray[1], vposarray[2]);
|
||||
pModelPosition.iDir = Vector3(vdirarray[0], vdirarray[1], vdirarray[2]);
|
||||
pModelPosition.iScale = scale;
|
||||
|
||||
unsigned short val = indexarray[i];
|
||||
tempIndexArray.append(val);
|
||||
}
|
||||
//==========================================
|
||||
delete[] indexarray;
|
||||
}
|
||||
|
||||
} // VMAP
|
||||
// ---- vectors
|
||||
READ_OR_RETURN(&blockId, 4);
|
||||
CMP_OR_RETURN(blockId, "VERT");
|
||||
READ_OR_RETURN(&blocksize, sizeof(int));
|
||||
unsigned int nvectors;
|
||||
READ_OR_RETURN(&nvectors, sizeof(int));
|
||||
|
||||
float *vectorarray = 0;
|
||||
|
||||
// add vectorarray free
|
||||
#undef READ_OR_RETURN
|
||||
#undef CMP_OR_RETURN
|
||||
#define READ_OR_RETURN(V,S) if(fread((V), (S), 1, rf) != 1) { \
|
||||
fclose(rf); delete gtree; delete[] vectorarray; return(false); }
|
||||
#define CMP_OR_RETURN(V,S) if(strcmp((V),(S)) != 0) { \
|
||||
fclose(rf); delete gtree; delete[] vectorarray; return(false); }
|
||||
|
||||
if(nvectors >0)
|
||||
{
|
||||
vectorarray = new float[nvectors*sizeof(float)*3];
|
||||
READ_OR_RETURN(vectorarray, nvectors*sizeof(float)*3);
|
||||
}
|
||||
// ----- liquit
|
||||
if(flags & 1)
|
||||
{
|
||||
// we have liquit -> not handled yet ... skip
|
||||
READ_OR_RETURN(&blockId, 4);
|
||||
CMP_OR_RETURN(blockId, "LIQU");
|
||||
READ_OR_RETURN(&blocksize, sizeof(int));
|
||||
fseek(rf, blocksize, SEEK_CUR);
|
||||
}
|
||||
|
||||
|
||||
for(unsigned int i=0, indexNo=0; indexNo<nvectors; indexNo++)
|
||||
{
|
||||
Vector3 v = Vector3(vectorarray[i+2], vectorarray[i+1], vectorarray[i+0]);
|
||||
i+=3;
|
||||
v = pModelPosition.transform(v);
|
||||
|
||||
float swapy = v.y;
|
||||
v.y = v.x;
|
||||
v.x = swapy;
|
||||
|
||||
tempVertexArray.append(v);
|
||||
}
|
||||
|
||||
// ---- calculate triangles
|
||||
int rest = nindexes%3;
|
||||
if(rest != 0)
|
||||
{
|
||||
nindexes -= rest;
|
||||
}
|
||||
|
||||
for(unsigned int i=0;i<(nindexes);)
|
||||
{
|
||||
Triangle t = Triangle(tempVertexArray[tempIndexArray[i+2]], tempVertexArray[tempIndexArray[i+1]], tempVertexArray[tempIndexArray[i+0]] );
|
||||
i+=3;
|
||||
++trianglecount;
|
||||
if(g>= startgroup && g <= endgroup)
|
||||
{
|
||||
gtree->insert(t);
|
||||
}
|
||||
}
|
||||
|
||||
// drop of temporary use defines
|
||||
#undef READ_OR_RETURN
|
||||
#undef CMP_OR_RETURN
|
||||
|
||||
if(vectorarray != 0)
|
||||
{
|
||||
delete vectorarray;
|
||||
}
|
||||
|
||||
if(gtree->size() >0)
|
||||
{
|
||||
gtree->balance();
|
||||
SubModel *sm = new SubModel(gtree);
|
||||
#ifdef _ASSEMBLER_DEBUG
|
||||
if(::g_df) fprintf(::g_df,"group trianglies: %d, Tris: %d, Nodes: %d, gtree.triangles: %d\n", g, sm->getNTriangles(), sm->getNNodes(), gtree->memberTable.size());
|
||||
if(sm->getNTriangles() != gtree->memberTable.size())
|
||||
{
|
||||
if(::g_df) fprintf(::g_df,"ERROR !!!! group trianglies: %d, Tris: %d, Nodes: %d, gtree.triangles: %d\n", g, sm->getNTriangles(), sm->getNNodes(), gtree->memberTable.size());
|
||||
}
|
||||
#endif
|
||||
sm->setBasePosition(pModelPosition.iPos);
|
||||
pMainTree->insert(sm);
|
||||
}
|
||||
delete gtree;
|
||||
}
|
||||
fclose(rf);
|
||||
return true;
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
|
||||
bool TileAssembler::fillModelIntoTree(AABSPTree<SubModel *> *pMainTree, const Vector3& pBasePos, std::string& pPos, std::string& pModelFilename)
|
||||
{
|
||||
ModelPosition modelPosition;
|
||||
getModelPosition(pPos, modelPosition);
|
||||
// all should be relative to object base position
|
||||
modelPosition.moveToBasePos(pBasePos);
|
||||
|
||||
modelPosition.init();
|
||||
|
||||
return readRawFile(pModelFilename, modelPosition, pMainTree);
|
||||
}
|
||||
|
||||
//=================================================================
|
||||
void TileAssembler::getModelPosition(std::string& pPosString, ModelPosition& pModelPosition)
|
||||
{
|
||||
float vposarray[3];
|
||||
float vdirarray[3];
|
||||
float scale;
|
||||
|
||||
size_t spos = pPosString.find_first_of('#');
|
||||
std::string stripedPosString = pPosString.substr(spos+1,pPosString.length());
|
||||
|
||||
sscanf(stripedPosString.c_str(), "%f,%f,%f_%f,%f,%f_%f",
|
||||
&vposarray[0],&vposarray[1],&vposarray[2],
|
||||
&vdirarray[0],&vdirarray[1],&vdirarray[2],
|
||||
&scale);
|
||||
|
||||
pModelPosition.iPos = Vector3(vposarray[0], vposarray[1], vposarray[2]);
|
||||
pModelPosition.iDir = Vector3(vdirarray[0], vdirarray[1], vdirarray[2]);
|
||||
pModelPosition.iScale = scale;
|
||||
|
||||
}
|
||||
//==========================================
|
||||
} // VMAP
|
||||
|
||||
Reference in New Issue
Block a user