mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-17 21:50:50 -04:00
Core/Guild: Code Refactor
- Send correct events when modifiying Ranks (Add, modify, delete) - Store money/slots withdraw, not remaining slots. This will update remaining slots/money properly. - Reset daily slots/money withdraw for all members at same time, configurable - Better debug messages
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
CREATE TABLE IF NOT EXISTS `guild_member_withdraw` (
|
||||
`guid` int(10) unsigned NOT NULL,
|
||||
`tab0` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`tab1` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`tab2` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`tab3` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`tab4` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`tab5` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`money` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Guild Member Daily Withdraws';
|
||||
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankRemMoney`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankRemSlotsTab0`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankRemSlotsTab1`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankRemSlotsTab2`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankRemSlotsTab3`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankRemSlotsTab4`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankRemSlotsTab5`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankResetTimeMoney`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankResetTimeTab0`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankResetTimeTab1`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankResetTimeTab2`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankResetTimeTab3`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankResetTimeTab4`;
|
||||
ALTER TABLE `guild_member` DROP COLUMN `BankResetTimeTab5`;
|
||||
|
||||
DELETE FROM `worldstates` WHERE `entry`=20006;
|
||||
INSERT INTO `worldstates` (`entry`,`value`,`comment`) VALUES (20006,0, 'Guild daily reset');
|
||||
|
||||
@@ -95,12 +95,12 @@ void WorldSession::SendBfLeaveMessage(uint32 BattleId, BFLeaveReason reason)
|
||||
}
|
||||
|
||||
//Send by client when he click on accept for queue
|
||||
void WorldSession::HandleBfQueueInviteResponse(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBfQueueInviteResponse(WorldPacket & recvData)
|
||||
{
|
||||
uint32 BattleId;
|
||||
uint8 Accepted;
|
||||
|
||||
recv_data >> BattleId >> Accepted;
|
||||
recvData >> BattleId >> Accepted;
|
||||
sLog->outError(LOG_FILTER_GENERAL, "HandleQueueInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
|
||||
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
|
||||
if (!Bf)
|
||||
@@ -113,12 +113,12 @@ void WorldSession::HandleBfQueueInviteResponse(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//Send by client on clicking in accept or refuse of invitation windows for join game
|
||||
void WorldSession::HandleBfEntryInviteResponse(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBfEntryInviteResponse(WorldPacket & recvData)
|
||||
{
|
||||
uint32 BattleId;
|
||||
uint8 Accepted;
|
||||
|
||||
recv_data >> BattleId >> Accepted;
|
||||
recvData >> BattleId >> Accepted;
|
||||
sLog->outError(LOG_FILTER_GENERAL, "HandleBattlefieldInviteResponse: BattleID:%u Accepted:%u", BattleId, Accepted);
|
||||
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
|
||||
if (!Bf)
|
||||
@@ -136,11 +136,11 @@ void WorldSession::HandleBfEntryInviteResponse(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleBfExitRequest(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBfExitRequest(WorldPacket & recvData)
|
||||
{
|
||||
uint32 BattleId;
|
||||
|
||||
recv_data >> BattleId;
|
||||
recvData >> BattleId;
|
||||
sLog->outError(LOG_FILTER_GENERAL, "HandleBfExitRequest: BattleID:%u ", BattleId);
|
||||
Battlefield* Bf = sBattlefieldMgr->GetBattlefieldByBattleId(BattleId);
|
||||
if (!Bf)
|
||||
|
||||
@@ -472,8 +472,6 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
|
||||
if (numPlayers != MAXGROUPSIZE)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) Compatibles but not enough players(%u)", strGuids.c_str(), numPlayers);
|
||||
LfgQueueDataContainer::iterator itQueue = QueueDataStore.find(check.front());
|
||||
|
||||
LfgCompatibilityData data(LFG_COMPATIBLES_WITH_LESS_PLAYERS);
|
||||
data.roles = proposalRoles;
|
||||
|
||||
@@ -677,4 +675,4 @@ void LFGQueue::UpdateBestCompatibleInQueue(LfgQueueDataContainer::iterator itrQu
|
||||
else
|
||||
--queueData.dps;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3022,6 +3022,9 @@ void Player::GiveLevel(uint8 level)
|
||||
if (level == oldLevel)
|
||||
return;
|
||||
|
||||
if (Guild* guild = GetGuild())
|
||||
guild->UpdateMemberData(this, GUILD_MEMBER_DATA_LEVEL, level);
|
||||
|
||||
PlayerLevelInfo info;
|
||||
sObjectMgr->GetPlayerLevelInfo(getRace(), getClass(), level, &info);
|
||||
|
||||
@@ -7446,6 +7449,8 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea)
|
||||
sBattlefieldMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sBattlefieldMgr->HandlePlayerEnterZone(this, newZone);
|
||||
SendInitWorldStates(newZone, newArea); // only if really enters to new zone, not just area change, works strange...
|
||||
if (Guild* guild = GetGuild())
|
||||
guild->UpdateMemberData(this, GUILD_MEMBER_DATA_ZONEID, newZone);
|
||||
}
|
||||
|
||||
// group update
|
||||
@@ -21517,7 +21522,7 @@ void Player::ToggleMetaGemsActive(uint8 exceptslot, bool apply)
|
||||
//cycle all equipped items
|
||||
for (int slot = EQUIPMENT_SLOT_START; slot < EQUIPMENT_SLOT_END; ++slot)
|
||||
{
|
||||
//enchants for the slot being socketed are handled by WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
|
||||
//enchants for the slot being socketed are handled by WorldSession::HandleSocketOpcode(WorldPacket& recvData)
|
||||
if (slot == exceptslot)
|
||||
continue;
|
||||
|
||||
@@ -25583,3 +25588,9 @@ void Player::SendMovementSetFeatherFall(bool apply)
|
||||
data << uint32(0); //! movement counter
|
||||
SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
Guild* Player::GetGuild()
|
||||
{
|
||||
uint32 guildId = GetGuildId();
|
||||
return guildId ? sGuildMgr->GetGuildById(guildId) : NULL;
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ class Channel;
|
||||
class Creature;
|
||||
class DynamicObject;
|
||||
class Group;
|
||||
class Guild;
|
||||
class OutdoorPvP;
|
||||
class Pet;
|
||||
class PlayerMenu;
|
||||
@@ -1819,9 +1820,10 @@ class Player : public Unit, public GridObject<Player>
|
||||
|
||||
void SetInGuild(uint32 GuildId) { SetUInt32Value(PLAYER_GUILDID, GuildId); }
|
||||
void SetRank(uint8 rankId) { SetUInt32Value(PLAYER_GUILDRANK, rankId); }
|
||||
uint8 GetRank() { return uint8(GetUInt32Value(PLAYER_GUILDRANK)); }
|
||||
uint8 GetRank() const { return uint8(GetUInt32Value(PLAYER_GUILDRANK)); }
|
||||
void SetGuildIdInvited(uint32 GuildId) { m_GuildIdInvited = GuildId; }
|
||||
uint32 GetGuildId() { return GetUInt32Value(PLAYER_GUILDID); }
|
||||
uint32 GetGuildId() const { return GetUInt32Value(PLAYER_GUILDID); }
|
||||
Guild* GetGuild();
|
||||
static uint32 GetGuildIdFromDB(uint64 guid);
|
||||
static uint8 GetRankFromDB(uint64 guid);
|
||||
int GetGuildIdInvited() { return m_GuildIdInvited; }
|
||||
|
||||
+584
-518
File diff suppressed because it is too large
Load Diff
+223
-145
@@ -37,7 +37,14 @@ enum GuildMisc
|
||||
GUILD_RANK_NONE = 0xFF,
|
||||
GUILD_WITHDRAW_MONEY_UNLIMITED = 0xFFFFFFFF,
|
||||
GUILD_WITHDRAW_SLOT_UNLIMITED = 0xFFFFFFFF,
|
||||
GUILD_EVENT_LOG_GUID_UNDEFINED = 0xFFFFFFFF
|
||||
GUILD_EVENT_LOG_GUID_UNDEFINED = 0xFFFFFFFF,
|
||||
TAB_UNDEFINED = 0xFF,
|
||||
};
|
||||
|
||||
enum GuildMemberData
|
||||
{
|
||||
GUILD_MEMBER_DATA_ZONEID,
|
||||
GUILD_MEMBER_DATA_LEVEL,
|
||||
};
|
||||
|
||||
enum GuildDefaultRanks
|
||||
@@ -54,87 +61,97 @@ enum GuildDefaultRanks
|
||||
|
||||
enum GuildRankRights
|
||||
{
|
||||
GR_RIGHT_EMPTY = 0x00000040,
|
||||
GR_RIGHT_GCHATLISTEN = GR_RIGHT_EMPTY | 0x00000001,
|
||||
GR_RIGHT_GCHATSPEAK = GR_RIGHT_EMPTY | 0x00000002,
|
||||
GR_RIGHT_OFFCHATLISTEN = GR_RIGHT_EMPTY | 0x00000004,
|
||||
GR_RIGHT_OFFCHATSPEAK = GR_RIGHT_EMPTY | 0x00000008,
|
||||
GR_RIGHT_INVITE = GR_RIGHT_EMPTY | 0x00000010,
|
||||
GR_RIGHT_REMOVE = GR_RIGHT_EMPTY | 0x00000020,
|
||||
GR_RIGHT_PROMOTE = GR_RIGHT_EMPTY | 0x00000080,
|
||||
GR_RIGHT_DEMOTE = GR_RIGHT_EMPTY | 0x00000100,
|
||||
GR_RIGHT_SETMOTD = GR_RIGHT_EMPTY | 0x00001000,
|
||||
GR_RIGHT_EPNOTE = GR_RIGHT_EMPTY | 0x00002000,
|
||||
GR_RIGHT_VIEWOFFNOTE = GR_RIGHT_EMPTY | 0x00004000,
|
||||
GR_RIGHT_EOFFNOTE = GR_RIGHT_EMPTY | 0x00008000,
|
||||
GR_RIGHT_MODIFY_GUILD_INFO = GR_RIGHT_EMPTY | 0x00010000,
|
||||
GR_RIGHT_WITHDRAW_GOLD_LOCK = 0x00020000, // remove money withdraw capacity
|
||||
GR_RIGHT_WITHDRAW_REPAIR = 0x00040000, // withdraw for repair
|
||||
GR_RIGHT_WITHDRAW_GOLD = 0x00080000, // withdraw gold
|
||||
GR_RIGHT_CREATE_GUILD_EVENT = 0x00100000, // wotlk
|
||||
GR_RIGHT_ALL = 0x001DF1FF
|
||||
GR_RIGHT_EMPTY = 0x00000040,
|
||||
GR_RIGHT_GCHATLISTEN = GR_RIGHT_EMPTY | 0x00000001,
|
||||
GR_RIGHT_GCHATSPEAK = GR_RIGHT_EMPTY | 0x00000002,
|
||||
GR_RIGHT_OFFCHATLISTEN = GR_RIGHT_EMPTY | 0x00000004,
|
||||
GR_RIGHT_OFFCHATSPEAK = GR_RIGHT_EMPTY | 0x00000008,
|
||||
GR_RIGHT_INVITE = GR_RIGHT_EMPTY | 0x00000010,
|
||||
GR_RIGHT_REMOVE = GR_RIGHT_EMPTY | 0x00000020,
|
||||
GR_RIGHT_PROMOTE = GR_RIGHT_EMPTY | 0x00000080,
|
||||
GR_RIGHT_DEMOTE = GR_RIGHT_EMPTY | 0x00000100,
|
||||
GR_RIGHT_SETMOTD = GR_RIGHT_EMPTY | 0x00001000,
|
||||
GR_RIGHT_EPNOTE = GR_RIGHT_EMPTY | 0x00002000,
|
||||
GR_RIGHT_VIEWOFFNOTE = GR_RIGHT_EMPTY | 0x00004000,
|
||||
GR_RIGHT_EOFFNOTE = GR_RIGHT_EMPTY | 0x00008000,
|
||||
GR_RIGHT_MODIFY_GUILD_INFO = GR_RIGHT_EMPTY | 0x00010000,
|
||||
GR_RIGHT_WITHDRAW_GOLD_LOCK = 0x00020000, // remove money withdraw capacity
|
||||
GR_RIGHT_WITHDRAW_REPAIR = 0x00040000, // withdraw for repair
|
||||
GR_RIGHT_WITHDRAW_GOLD = 0x00080000, // withdraw gold
|
||||
GR_RIGHT_CREATE_GUILD_EVENT = 0x00100000, // wotlk
|
||||
GR_RIGHT_ALL = 0x001DF1FF
|
||||
};
|
||||
|
||||
enum GuildCommandType
|
||||
{
|
||||
GUILD_CREATE_S = 0x00,
|
||||
GUILD_INVITE_S = 0x01,
|
||||
GUILD_QUIT_S = 0x03,
|
||||
GUILD_FOUNDER_S = 0x0E,
|
||||
GUILD_UNK1 = 0x13,
|
||||
GUILD_UNK2 = 0x14
|
||||
GUILD_COMMAND_CREATE = 0,
|
||||
GUILD_COMMAND_INVITE = 1,
|
||||
GUILD_COMMAND_QUIT = 3,
|
||||
GUILD_COMMAND_ROSTER = 5,
|
||||
GUILD_COMMAND_PROMOTE = 6,
|
||||
GUILD_COMMAND_DEMOTE = 7,
|
||||
GUILD_COMMAND_REMOVE = 8,
|
||||
GUILD_COMMAND_CHANGE_LEADER = 10,
|
||||
GUILD_COMMAND_EDIT_MOTD = 11,
|
||||
GUILD_COMMAND_GUILD_CHAT = 13,
|
||||
GUILD_COMMAND_FOUNDER = 14,
|
||||
GUILD_COMMAND_CHANGE_RANK = 16,
|
||||
GUILD_COMMAND_PUBLIC_NOTE = 19,
|
||||
GUILD_COMMAND_VIEW_TAB = 21,
|
||||
GUILD_COMMAND_MOVE_ITEM = 22,
|
||||
GUILD_COMMAND_REPAIR = 25,
|
||||
};
|
||||
|
||||
enum GuildCommandError
|
||||
{
|
||||
ERR_PLAYER_NO_MORE_IN_GUILD = 0x00,
|
||||
ERR_GUILD_INTERNAL = 0x01,
|
||||
ERR_ALREADY_IN_GUILD = 0x02,
|
||||
ERR_ALREADY_IN_GUILD_S = 0x03,
|
||||
ERR_INVITED_TO_GUILD = 0x04,
|
||||
ERR_ALREADY_INVITED_TO_GUILD_S = 0x05,
|
||||
ERR_GUILD_NAME_INVALID = 0x06,
|
||||
ERR_GUILD_NAME_EXISTS_S = 0x07,
|
||||
ERR_GUILD_LEADER_LEAVE = 0x08,
|
||||
ERR_GUILD_PERMISSIONS = 0x08,
|
||||
ERR_GUILD_PLAYER_NOT_IN_GUILD = 0x09,
|
||||
ERR_GUILD_PLAYER_NOT_IN_GUILD_S = 0x0A,
|
||||
ERR_GUILD_PLAYER_NOT_FOUND_S = 0x0B,
|
||||
ERR_GUILD_NOT_ALLIED = 0x0C,
|
||||
ERR_GUILD_RANK_TOO_HIGH_S = 0x0D,
|
||||
ERR_GUILD_RANK_TOO_LOW_S = 0x0E,
|
||||
ERR_GUILD_RANKS_LOCKED = 0x11,
|
||||
ERR_GUILD_RANK_IN_USE = 0x12,
|
||||
ERR_GUILD_IGNORING_YOU_S = 0x13,
|
||||
ERR_GUILD_UNK1 = 0x14,
|
||||
ERR_GUILD_WITHDRAW_LIMIT = 0x19,
|
||||
ERR_GUILD_NOT_ENOUGH_MONEY = 0x1A,
|
||||
ERR_GUILD_BANK_FULL = 0x1C,
|
||||
ERR_GUILD_ITEM_NOT_FOUND = 0x1D
|
||||
ERR_GUILD_COMMAND_SUCCESS = 0,
|
||||
ERR_GUILD_INTERNAL = 1,
|
||||
ERR_ALREADY_IN_GUILD = 2,
|
||||
ERR_ALREADY_IN_GUILD_S = 3,
|
||||
ERR_INVITED_TO_GUILD = 4,
|
||||
ERR_ALREADY_INVITED_TO_GUILD_S = 5,
|
||||
ERR_GUILD_NAME_INVALID = 6,
|
||||
ERR_GUILD_NAME_EXISTS_S = 7,
|
||||
ERR_GUILD_LEADER_LEAVE = 8,
|
||||
ERR_GUILD_PERMISSIONS = 8,
|
||||
ERR_GUILD_PLAYER_NOT_IN_GUILD = 9,
|
||||
ERR_GUILD_PLAYER_NOT_IN_GUILD_S = 10,
|
||||
ERR_GUILD_PLAYER_NOT_FOUND_S = 11,
|
||||
ERR_GUILD_NOT_ALLIED = 12,
|
||||
ERR_GUILD_RANK_TOO_HIGH_S = 13,
|
||||
ERR_GUILD_RANK_TOO_LOW_S = 14,
|
||||
ERR_GUILD_RANKS_LOCKED = 17,
|
||||
ERR_GUILD_RANK_IN_USE = 18,
|
||||
ERR_GUILD_IGNORING_YOU_S = 19,
|
||||
ERR_GUILD_UNK1 = 20, // Forces roster update
|
||||
ERR_GUILD_WITHDRAW_LIMIT = 25,
|
||||
ERR_GUILD_NOT_ENOUGH_MONEY = 26,
|
||||
ERR_GUILD_BANK_FULL = 28,
|
||||
ERR_GUILD_ITEM_NOT_FOUND = 29,
|
||||
};
|
||||
|
||||
enum GuildEvents
|
||||
{
|
||||
GE_PROMOTION = 0x00,
|
||||
GE_DEMOTION = 0x01,
|
||||
GE_MOTD = 0x02,
|
||||
GE_JOINED = 0x03,
|
||||
GE_LEFT = 0x04,
|
||||
GE_REMOVED = 0x05,
|
||||
GE_LEADER_IS = 0x06,
|
||||
GE_LEADER_CHANGED = 0x07,
|
||||
GE_DISBANDED = 0x08,
|
||||
GE_TABARDCHANGE = 0x09,
|
||||
GE_UNK1 = 0x0A, // string, string EVENT_GUILD_ROSTER_UPDATE tab content change?
|
||||
GE_UNK2 = 0x0B, // EVENT_GUILD_ROSTER_UPDATE
|
||||
GE_SIGNED_ON = 0x0C, // ERR_FRIEND_ONLINE_SS
|
||||
GE_SIGNED_OFF = 0x0D, // ERR_FRIEND_OFFLINE_S
|
||||
GE_GUILDBANK_BAGSLOTS_CHANGED = 0x0E, // EVENT_GUILDBANK_BAGSLOTS_CHANGED
|
||||
GE_GUILDBANK_TAB_PURCHASED = 0x0F, // EVENT_GUILDBANK_UPDATE_TABS
|
||||
GE_UNK5 = 0x10, // EVENT_GUILDBANK_UPDATE_TABS
|
||||
GE_GUILDBANK_MONEY_UPDATE = 0x11, // EVENT_GUILDBANK_UPDATE_MONEY, string 0000000000002710 is 1 gold
|
||||
GE_GUILDBANK_MONEY_WITHDRAWN = 0x12, // MSG_GUILD_BANK_MONEY_WITHDRAWN
|
||||
GE_GUILDBANK_TEXT_CHANGED = 0x13 // EVENT_GUILDBANK_TEXT_CHANGED
|
||||
GE_PROMOTION = 0,
|
||||
GE_DEMOTION = 1,
|
||||
GE_MOTD = 2,
|
||||
GE_JOINED = 3,
|
||||
GE_LEFT = 4,
|
||||
GE_REMOVED = 5,
|
||||
GE_LEADER_IS = 6,
|
||||
GE_LEADER_CHANGED = 7,
|
||||
GE_DISBANDED = 8,
|
||||
GE_TABARDCHANGE = 9,
|
||||
GE_RANK_UPDATED = 10,
|
||||
GE_RANK_DELETED = 11,
|
||||
GE_SIGNED_ON = 12,
|
||||
GE_SIGNED_OFF = 13,
|
||||
GE_GUILDBANKBAGSLOTS_CHANGED = 14,
|
||||
GE_BANK_TAB_PURCHASED = 15,
|
||||
GE_BANK_TAB_UPDATED = 16,
|
||||
GE_BANK_MONEY_SET = 17,
|
||||
GE_BANK_MONEY_CHANGED = 18,
|
||||
GE_BANK_TEXT_CHANGED = 19,
|
||||
};
|
||||
|
||||
enum PetitionTurns
|
||||
@@ -146,44 +163,44 @@ enum PetitionTurns
|
||||
|
||||
enum PetitionSigns
|
||||
{
|
||||
PETITION_SIGN_OK = 0,
|
||||
PETITION_SIGN_ALREADY_SIGNED = 1,
|
||||
PETITION_SIGN_ALREADY_IN_GUILD = 2,
|
||||
PETITION_SIGN_CANT_SIGN_OWN = 3,
|
||||
PETITION_SIGN_NOT_SERVER = 4
|
||||
PETITION_SIGN_OK = 0,
|
||||
PETITION_SIGN_ALREADY_SIGNED = 1,
|
||||
PETITION_SIGN_ALREADY_IN_GUILD = 2,
|
||||
PETITION_SIGN_CANT_SIGN_OWN = 3,
|
||||
PETITION_SIGN_NOT_SERVER = 4
|
||||
};
|
||||
|
||||
enum GuildBankRights
|
||||
{
|
||||
GUILD_BANK_RIGHT_VIEW_TAB = 0x01,
|
||||
GUILD_BANK_RIGHT_PUT_ITEM = 0x02,
|
||||
GUILD_BANK_RIGHT_UPDATE_TEXT = 0x04,
|
||||
GUILD_BANK_RIGHT_VIEW_TAB = 0x01,
|
||||
GUILD_BANK_RIGHT_PUT_ITEM = 0x02,
|
||||
GUILD_BANK_RIGHT_UPDATE_TEXT = 0x04,
|
||||
|
||||
GUILD_BANK_RIGHT_DEPOSIT_ITEM = GUILD_BANK_RIGHT_VIEW_TAB | GUILD_BANK_RIGHT_PUT_ITEM,
|
||||
GUILD_BANK_RIGHT_FULL = 0xFF
|
||||
GUILD_BANK_RIGHT_DEPOSIT_ITEM = GUILD_BANK_RIGHT_VIEW_TAB | GUILD_BANK_RIGHT_PUT_ITEM,
|
||||
GUILD_BANK_RIGHT_FULL = 0xFF
|
||||
};
|
||||
|
||||
enum GuildBankEventLogTypes
|
||||
{
|
||||
GUILD_BANK_LOG_DEPOSIT_ITEM = 1,
|
||||
GUILD_BANK_LOG_WITHDRAW_ITEM = 2,
|
||||
GUILD_BANK_LOG_MOVE_ITEM = 3,
|
||||
GUILD_BANK_LOG_DEPOSIT_MONEY = 4,
|
||||
GUILD_BANK_LOG_WITHDRAW_MONEY = 5,
|
||||
GUILD_BANK_LOG_REPAIR_MONEY = 6,
|
||||
GUILD_BANK_LOG_MOVE_ITEM2 = 7,
|
||||
GUILD_BANK_LOG_UNK1 = 8,
|
||||
GUILD_BANK_LOG_UNK2 = 9
|
||||
GUILD_BANK_LOG_DEPOSIT_ITEM = 1,
|
||||
GUILD_BANK_LOG_WITHDRAW_ITEM = 2,
|
||||
GUILD_BANK_LOG_MOVE_ITEM = 3,
|
||||
GUILD_BANK_LOG_DEPOSIT_MONEY = 4,
|
||||
GUILD_BANK_LOG_WITHDRAW_MONEY = 5,
|
||||
GUILD_BANK_LOG_REPAIR_MONEY = 6,
|
||||
GUILD_BANK_LOG_MOVE_ITEM2 = 7,
|
||||
GUILD_BANK_LOG_UNK1 = 8,
|
||||
GUILD_BANK_LOG_BUY_SLOT = 9
|
||||
};
|
||||
|
||||
enum GuildEventLogTypes
|
||||
{
|
||||
GUILD_EVENT_LOG_INVITE_PLAYER = 1,
|
||||
GUILD_EVENT_LOG_JOIN_GUILD = 2,
|
||||
GUILD_EVENT_LOG_PROMOTE_PLAYER = 3,
|
||||
GUILD_EVENT_LOG_DEMOTE_PLAYER = 4,
|
||||
GUILD_EVENT_LOG_UNINVITE_PLAYER = 5,
|
||||
GUILD_EVENT_LOG_LEAVE_GUILD = 6
|
||||
GUILD_EVENT_LOG_INVITE_PLAYER = 1,
|
||||
GUILD_EVENT_LOG_JOIN_GUILD = 2,
|
||||
GUILD_EVENT_LOG_PROMOTE_PLAYER = 3,
|
||||
GUILD_EVENT_LOG_DEMOTE_PLAYER = 4,
|
||||
GUILD_EVENT_LOG_UNINVITE_PLAYER = 5,
|
||||
GUILD_EVENT_LOG_LEAVE_GUILD = 6
|
||||
};
|
||||
|
||||
enum GuildEmblemError
|
||||
@@ -196,7 +213,15 @@ enum GuildEmblemError
|
||||
ERR_GUILDEMBLEM_INVALIDVENDOR = 5
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
enum GuildMemberFlags
|
||||
{
|
||||
GUILDMEMBER_STATUS_NONE = 0x0000,
|
||||
GUILDMEMBER_STATUS_ONLINE = 0x0001,
|
||||
GUILDMEMBER_STATUS_AFK = 0x0002,
|
||||
GUILDMEMBER_STATUS_DND = 0x0004,
|
||||
GUILDMEMBER_STATUS_MOBILE = 0x0008, // remote chat from mobile app
|
||||
};
|
||||
|
||||
// Emblem info
|
||||
class EmblemInfo
|
||||
{
|
||||
@@ -205,7 +230,7 @@ public:
|
||||
|
||||
void LoadFromDB(Field* fields);
|
||||
void SaveToDB(uint32 guildId) const;
|
||||
void ReadPacket(WorldPacket& recv) { recv >> m_style >> m_color >> m_borderStyle >> m_borderColor >> m_backgroundColor; }
|
||||
void ReadPacket(WorldPacket& recv);
|
||||
void WritePacket(WorldPacket& data) const;
|
||||
|
||||
uint32 GetStyle() const { return m_style; }
|
||||
@@ -223,21 +248,33 @@ private:
|
||||
};
|
||||
|
||||
// Structure for storing guild bank rights and remaining slots together.
|
||||
struct GuildBankRightsAndSlots
|
||||
class GuildBankRightsAndSlots
|
||||
{
|
||||
GuildBankRightsAndSlots() : rights(0), slots(0) { }
|
||||
GuildBankRightsAndSlots(uint8 _rights, uint32 _slots) : rights(_rights), slots(_slots) { }
|
||||
public:
|
||||
GuildBankRightsAndSlots() : tabId(TAB_UNDEFINED), rights(0), slots(0) { }
|
||||
GuildBankRightsAndSlots(uint8 _tabId) : tabId(_tabId), rights(0), slots(0) { }
|
||||
GuildBankRightsAndSlots(uint8 _tabId, uint8 _rights, uint32 _slots) : tabId(_tabId), rights(_rights), slots(_slots) { }
|
||||
|
||||
inline bool IsEqual(GuildBankRightsAndSlots const& rhs) const { return rights == rhs.rights && slots == rhs.slots; }
|
||||
void SetGuildMasterValues()
|
||||
{
|
||||
rights = GUILD_BANK_RIGHT_FULL;
|
||||
slots = uint32(GUILD_WITHDRAW_SLOT_UNLIMITED);
|
||||
}
|
||||
|
||||
void SetTabId(uint8 _tabId) { tabId = _tabId; }
|
||||
void SetSlots(uint32 _slots) { slots = _slots; }
|
||||
void SetRights(uint8 _rights) { rights = _rights; }
|
||||
|
||||
int8 GetTabId() const { return tabId; }
|
||||
int32 GetSlots() const { return slots; }
|
||||
int8 GetRights() const { return rights; }
|
||||
|
||||
private:
|
||||
uint8 tabId;
|
||||
uint8 rights;
|
||||
uint32 slots;
|
||||
};
|
||||
|
||||
typedef std::vector <GuildBankRightsAndSlots> GuildBankRightsAndSlotsVec;
|
||||
|
||||
typedef std::set <uint8> SlotIds;
|
||||
@@ -248,16 +285,19 @@ private:
|
||||
// Class representing guild member
|
||||
class Member
|
||||
{
|
||||
struct RemainingValue
|
||||
{
|
||||
RemainingValue() : value(0), resetTime(0) { }
|
||||
|
||||
uint32 value;
|
||||
uint32 resetTime;
|
||||
};
|
||||
|
||||
public:
|
||||
Member(uint32 guildId, uint64 guid, uint8 rankId) : m_guildId(guildId), m_guid(guid), m_logoutTime(::time(NULL)), m_rankId(rankId) { }
|
||||
Member(uint32 guildId, uint64 guid, uint8 rankId):
|
||||
m_guildId(guildId),
|
||||
m_guid(guid),
|
||||
m_zoneId(0),
|
||||
m_level(0),
|
||||
m_class(0),
|
||||
m_logoutTime(::time(NULL)),
|
||||
m_accountId(0),
|
||||
m_rankId(rankId)
|
||||
{
|
||||
memset(m_bankWithdraw, 0, (GUILD_BANK_MAX_TABS + 1) * sizeof(int32));
|
||||
}
|
||||
|
||||
void SetStats(Player* player);
|
||||
void SetStats(std::string const& name, uint8 level, uint8 _class, uint32 zoneId, uint32 accountId);
|
||||
@@ -265,6 +305,12 @@ private:
|
||||
|
||||
void SetPublicNote(std::string const& publicNote);
|
||||
void SetOfficerNote(std::string const& officerNote);
|
||||
void SetZoneID(uint32 id) { m_zoneId = id; }
|
||||
void SetLevel(uint8 var) { m_level = var; }
|
||||
|
||||
void AddFlag(uint8 var) { m_flags |= var; }
|
||||
void RemFlag(uint8 var) { m_flags &= ~var; }
|
||||
void ResetFlags() { m_flags = GUILDMEMBER_STATUS_NONE; }
|
||||
|
||||
bool LoadFromDB(Field* fields);
|
||||
void SaveToDB(SQLTransaction& trans) const;
|
||||
@@ -274,6 +320,14 @@ private:
|
||||
std::string const& GetName() const { return m_name; }
|
||||
uint32 GetAccountId() const { return m_accountId; }
|
||||
uint8 GetRankId() const { return m_rankId; }
|
||||
uint64 GetLogoutTime() const { return m_logoutTime; }
|
||||
std::string GetPublicNote() const { return m_publicNote; }
|
||||
std::string GetOfficerNote() const { return m_officerNote; }
|
||||
uint8 GetClass() const { return m_class; }
|
||||
uint8 GetLevel() const { return m_level; }
|
||||
uint8 GetFlags() const { return m_flags; }
|
||||
uint32 GetZoneId() const { return m_zoneId; }
|
||||
bool IsOnline() { return (m_flags & GUILDMEMBER_STATUS_ONLINE); }
|
||||
|
||||
void ChangeRank(uint8 newRank);
|
||||
|
||||
@@ -282,11 +336,9 @@ private:
|
||||
inline bool IsRankNotLower(uint8 rankId) const { return m_rankId <= rankId; }
|
||||
inline bool IsSamePlayer(uint64 guid) const { return m_guid == guid; }
|
||||
|
||||
void DecreaseBankRemainingValue(SQLTransaction& trans, uint8 tabId, uint32 amount);
|
||||
uint32 GetBankRemainingValue(uint8 tabId, const Guild* guild) const;
|
||||
|
||||
void ResetTabTimes();
|
||||
void ResetMoneyTime();
|
||||
void UpdateBankWithdrawValue(SQLTransaction& trans, uint8 tabId, uint32 amount);
|
||||
int32 GetBankWithdrawValue(uint8 tabId) const;
|
||||
void ResetValues();
|
||||
|
||||
inline Player* FindPlayer() const { return ObjectAccessor::FindPlayer(m_guid); }
|
||||
|
||||
@@ -296,16 +348,17 @@ private:
|
||||
uint64 m_guid;
|
||||
std::string m_name;
|
||||
uint32 m_zoneId;
|
||||
uint8 m_level;
|
||||
uint8 m_class;
|
||||
uint8 m_level;
|
||||
uint8 m_class;
|
||||
uint8 m_flags;
|
||||
uint64 m_logoutTime;
|
||||
uint32 m_accountId;
|
||||
// Fields from guild_member table
|
||||
uint8 m_rankId;
|
||||
uint8 m_rankId;
|
||||
std::string m_publicNote;
|
||||
std::string m_officerNote;
|
||||
|
||||
RemainingValue m_bankRemaining[GUILD_BANK_MAX_TABS + 1];
|
||||
int32 m_bankWithdraw[GUILD_BANK_MAX_TABS + 1];
|
||||
};
|
||||
|
||||
// Base class for event entries
|
||||
@@ -317,6 +370,7 @@ private:
|
||||
virtual ~LogEntry() { }
|
||||
|
||||
uint32 GetGUID() const { return m_guid; }
|
||||
uint64 GetTimestamp() const { return m_timestamp; }
|
||||
|
||||
virtual void SaveToDB(SQLTransaction& trans) const = 0;
|
||||
virtual void WritePacket(WorldPacket& data) const = 0;
|
||||
@@ -384,6 +438,8 @@ private:
|
||||
};
|
||||
|
||||
// Class encapsulating work with events collection
|
||||
typedef std::list<LogEntry*> GuildLog;
|
||||
|
||||
class LogHolder
|
||||
{
|
||||
public:
|
||||
@@ -402,17 +458,17 @@ private:
|
||||
uint32 GetNextGUID();
|
||||
|
||||
private:
|
||||
typedef std::list<LogEntry*> GuildLog;
|
||||
GuildLog m_log;
|
||||
uint32 m_guildId;
|
||||
uint32 m_maxRecords;
|
||||
uint32 m_nextGUID;
|
||||
};
|
||||
|
||||
// Class incapsulating guild rank data
|
||||
// Class encapsulating guild rank data
|
||||
class RankInfo
|
||||
{
|
||||
public:
|
||||
RankInfo(): m_guildId(0), m_rankId(GUILD_RANK_NONE), m_rights(GR_RIGHT_EMPTY), m_bankMoneyPerDay(0) { }
|
||||
RankInfo(uint32 guildId) : m_guildId(guildId), m_rankId(GUILD_RANK_NONE), m_rights(GR_RIGHT_EMPTY), m_bankMoneyPerDay(0) { }
|
||||
RankInfo(uint32 guildId, uint8 rankId, std::string const& name, uint32 rights, uint32 money) :
|
||||
m_guildId(guildId), m_rankId(rankId), m_name(name), m_rights(rights), m_bankMoneyPerDay(money) { }
|
||||
@@ -429,17 +485,22 @@ private:
|
||||
uint32 GetRights() const { return m_rights; }
|
||||
void SetRights(uint32 rights);
|
||||
|
||||
uint32 GetBankMoneyPerDay() const { return m_rankId == GR_GUILDMASTER ? GUILD_WITHDRAW_MONEY_UNLIMITED : m_bankMoneyPerDay; }
|
||||
int32 GetBankMoneyPerDay() const { return m_bankMoneyPerDay; }
|
||||
|
||||
void SetBankMoneyPerDay(uint32 money);
|
||||
|
||||
inline uint8 GetBankTabRights(uint8 tabId) const { return tabId < GUILD_BANK_MAX_TABS ? m_bankTabRightsAndSlots[tabId].rights : 0; }
|
||||
inline uint32 GetBankTabSlotsPerDay(uint8 tabId) const
|
||||
inline int8 GetBankTabRights(uint8 tabId) const
|
||||
{
|
||||
if (tabId < GUILD_BANK_MAX_TABS)
|
||||
return m_rankId == GR_GUILDMASTER ? GUILD_WITHDRAW_SLOT_UNLIMITED : m_bankTabRightsAndSlots[tabId].slots;
|
||||
return 0;
|
||||
return tabId < GUILD_BANK_MAX_TABS ? m_bankTabRightsAndSlots[tabId].GetRights() : 0;
|
||||
}
|
||||
void SetBankTabSlotsAndRights(uint8 tabId, GuildBankRightsAndSlots rightsAndSlots, bool saveToDB);
|
||||
|
||||
inline int32 GetBankTabSlotsPerDay(uint8 tabId) const
|
||||
{
|
||||
return tabId < GUILD_BANK_MAX_TABS ? m_bankTabRightsAndSlots[tabId].GetSlots() : 0;
|
||||
}
|
||||
|
||||
void SetBankTabSlotsAndRights(GuildBankRightsAndSlots rightsAndSlots, bool saveToDB);
|
||||
bool CreateMissingTabsIfNeeded(uint8 ranks, SQLTransaction& trans);
|
||||
|
||||
private:
|
||||
uint32 m_guildId;
|
||||
@@ -459,12 +520,12 @@ private:
|
||||
memset(m_items, 0, GUILD_BANK_MAX_SLOTS * sizeof(Item*));
|
||||
}
|
||||
|
||||
bool LoadFromDB(Field* fields);
|
||||
void LoadFromDB(Field* fields);
|
||||
bool LoadItemFromDB(Field* fields);
|
||||
void Delete(SQLTransaction& trans, bool removeItemsFromDB = false);
|
||||
|
||||
void WritePacket(WorldPacket& data) const;
|
||||
void WriteSlotPacket(WorldPacket& data, uint8 slotId) const;
|
||||
bool WriteSlotPacket(WorldPacket& data, uint8 slotId, bool ignoreEmpty = true) const;
|
||||
void WriteInfoPacket(WorldPacket& data) const
|
||||
{
|
||||
data << m_name;
|
||||
@@ -523,6 +584,7 @@ private:
|
||||
Item* GetItem(bool isCloned = false) const { return isCloned ? m_pClonedItem : m_pItem; }
|
||||
uint8 GetContainer() const { return m_container; }
|
||||
uint8 GetSlotId() const { return m_slotId; }
|
||||
|
||||
protected:
|
||||
virtual InventoryResult CanStore(Item* pItem, bool swap) = 0;
|
||||
|
||||
@@ -612,22 +674,26 @@ public:
|
||||
void HandleRemoveMember(WorldSession* session, std::string const& name);
|
||||
void HandleUpdateMemberRank(WorldSession* session, std::string const& name, bool demote);
|
||||
void HandleAddNewRank(WorldSession* session, std::string const& name);
|
||||
void HandleRemoveRank(WorldSession* session, uint8 rankId);
|
||||
void HandleRemoveLowestRank(WorldSession* session);
|
||||
void HandleMemberDepositMoney(WorldSession* session, uint32 amount);
|
||||
bool HandleMemberWithdrawMoney(WorldSession* session, uint32 amount, bool repair = false);
|
||||
void HandleMemberLogout(WorldSession* session);
|
||||
void HandleDisband(WorldSession* session);
|
||||
|
||||
void UpdateMemberData(Player* player, uint8 dataid, uint32 value);
|
||||
void OnPlayerStatusChange(Player* player, uint32 flag, bool state);
|
||||
|
||||
// Send info to client
|
||||
void SendInfo(WorldSession* session) const;
|
||||
void SendEventLog(WorldSession* session) const;
|
||||
void SendBankLog(WorldSession* session, uint8 tabId) const;
|
||||
void SendBankTabsInfo(WorldSession* session) const;
|
||||
void SendBankTabsInfo(WorldSession* session, bool showTabs = false) const;
|
||||
void SendBankTabData(WorldSession* session, uint8 tabId) const;
|
||||
void SendBankTabText(WorldSession* session, uint8 tabId) const;
|
||||
void SendPermissions(WorldSession* session) const;
|
||||
void SendMoneyInfo(WorldSession* session) const;
|
||||
void SendLoginInfo(WorldSession* session) const;
|
||||
void SendLoginInfo(WorldSession* session);
|
||||
|
||||
// Load from DB
|
||||
bool LoadFromDB(Field* fields);
|
||||
@@ -635,7 +701,7 @@ public:
|
||||
bool LoadMemberFromDB(Field* fields);
|
||||
bool LoadEventLogFromDB(Field* fields);
|
||||
void LoadBankRightFromDB(Field* fields);
|
||||
bool LoadBankTabFromDB(Field* fields);
|
||||
void LoadBankTabFromDB(Field* fields);
|
||||
bool LoadBankEventLogFromDB(Field* fields);
|
||||
bool LoadBankItemFromDB(Field* fields);
|
||||
bool Validate();
|
||||
@@ -667,6 +733,8 @@ public:
|
||||
// Bank tabs
|
||||
void SetBankTabText(uint8 tabId, std::string const& text);
|
||||
|
||||
void ResetTimes();
|
||||
|
||||
protected:
|
||||
uint32 m_id;
|
||||
std::string m_name;
|
||||
@@ -691,7 +759,14 @@ private:
|
||||
inline uint8 _GetRanksSize() const { return uint8(m_ranks.size()); }
|
||||
inline const RankInfo* GetRankInfo(uint8 rankId) const { return rankId < _GetRanksSize() ? &m_ranks[rankId] : NULL; }
|
||||
inline RankInfo* GetRankInfo(uint8 rankId) { return rankId < _GetRanksSize() ? &m_ranks[rankId] : NULL; }
|
||||
inline bool _HasRankRight(Player* player, uint32 right) const { return (_GetRankRights(player->GetRank()) & right) != GR_RIGHT_EMPTY; }
|
||||
inline bool _HasRankRight(Player* player, uint32 right) const
|
||||
{
|
||||
if (player)
|
||||
if (Member const* member = GetMember(player->GetGUID()))
|
||||
return (_GetRankRights(member->GetRankId()) & right) != GR_RIGHT_EMPTY;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline uint8 _GetLowestRankId() const { return uint8(m_ranks.size() - 1); }
|
||||
|
||||
inline uint8 _GetPurchasedTabsSize() const { return uint8(m_bankTabs.size()); }
|
||||
@@ -703,20 +778,22 @@ private:
|
||||
Members::const_iterator itr = m_members.find(GUID_LOPART(guid));
|
||||
return itr != m_members.end() ? itr->second : NULL;
|
||||
}
|
||||
|
||||
inline Member* GetMember(uint64 guid)
|
||||
{
|
||||
Members::iterator itr = m_members.find(GUID_LOPART(guid));
|
||||
return itr != m_members.end() ? itr->second : NULL;
|
||||
}
|
||||
inline Member* GetMember(WorldSession* session, std::string const& name)
|
||||
|
||||
inline Member* GetMember(std::string const& name)
|
||||
{
|
||||
for (Members::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
if (itr->second->GetName() == name)
|
||||
return itr->second;
|
||||
|
||||
SendCommandResult(session, GUILD_INVITE_S, ERR_GUILD_PLAYER_NOT_IN_GUILD_S, name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline void _DeleteMemberFromDB(uint32 lowguid) const
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GUILD_MEMBER);
|
||||
@@ -727,11 +804,11 @@ private:
|
||||
// Creates log holders (either when loading or when creating guild)
|
||||
void _CreateLogHolders();
|
||||
// Tries to create new bank tab
|
||||
bool _CreateNewBankTab();
|
||||
void _CreateNewBankTab();
|
||||
// Creates default guild ranks with names in given locale
|
||||
void _CreateDefaultGuildRanks(LocaleConstant loc);
|
||||
// Creates new rank
|
||||
void _CreateRank(std::string const& name, uint32 rights);
|
||||
bool _CreateRank(std::string const& name, uint32 rights);
|
||||
// Update account number when member added/removed from guild
|
||||
void _UpdateAccountsNumber();
|
||||
bool _IsLeader(Player* player) const;
|
||||
@@ -740,16 +817,16 @@ private:
|
||||
void _SetLeaderGUID(Member* pLeader);
|
||||
|
||||
void _SetRankBankMoneyPerDay(uint8 rankId, uint32 moneyPerDay);
|
||||
void _SetRankBankTabRightsAndSlots(uint8 rankId, uint8 tabId, GuildBankRightsAndSlots rightsAndSlots, bool saveToDB = true);
|
||||
uint8 _GetRankBankTabRights(uint8 rankId, uint8 tabId) const;
|
||||
void _SetRankBankTabRightsAndSlots(uint8 rankId, GuildBankRightsAndSlots rightsAndSlots, bool saveToDB = true);
|
||||
int8 _GetRankBankTabRights(uint8 rankId, uint8 tabId) const;
|
||||
uint32 _GetRankRights(uint8 rankId) const;
|
||||
uint32 _GetRankBankMoneyPerDay(uint8 rankId) const;
|
||||
uint32 _GetRankBankTabSlotsPerDay(uint8 rankId, uint8 tabId) const;
|
||||
int32 _GetRankBankMoneyPerDay(uint8 rankId) const;
|
||||
int32 _GetRankBankTabSlotsPerDay(uint8 rankId, uint8 tabId) const;
|
||||
std::string _GetRankName(uint8 rankId) const;
|
||||
|
||||
uint32 _GetMemberRemainingSlots(uint64 guid, uint8 tabId) const;
|
||||
uint32 _GetMemberRemainingMoney(uint64 guid) const;
|
||||
void _DecreaseMemberRemainingSlots(SQLTransaction& trans, uint64 guid, uint8 tabId);
|
||||
int32 _GetMemberRemainingSlots(Member const* member, uint8 tabId) const;
|
||||
int32 _GetMemberRemainingMoney(Member const* member) const;
|
||||
void _UpdateMemberWithdrawSlots(SQLTransaction& trans, uint64 guid, uint8 tabId);
|
||||
bool _MemberHasTabRights(uint64 guid, uint8 tabId, uint32 rights) const;
|
||||
|
||||
void _LogEvent(GuildEventLogTypes eventType, uint32 playerGuid1, uint32 playerGuid2 = 0, uint8 newRank = 0);
|
||||
@@ -764,6 +841,7 @@ private:
|
||||
void _SendBankMoneyUpdate(WorldSession* session) const;
|
||||
void _SendBankContentUpdate(MoveItemData* pSrc, MoveItemData* pDest) const;
|
||||
void _SendBankContentUpdate(uint8 tabId, SlotIds slots) const;
|
||||
void _SendBankList(WorldSession* session = NULL, uint8 tabId = 0, bool sendFullSlots = false, SlotIds *slots = NULL) const;
|
||||
|
||||
void _BroadcastEvent(GuildEvents guildEvent, uint64 guid, const char* param1 = NULL, const char* param2 = NULL, const char* param3 = NULL) const;
|
||||
};
|
||||
|
||||
@@ -18,10 +18,8 @@
|
||||
#include "Common.h"
|
||||
#include "GuildMgr.h"
|
||||
|
||||
GuildMgr::GuildMgr()
|
||||
{
|
||||
NextGuildId = 1;
|
||||
}
|
||||
GuildMgr::GuildMgr() : NextGuildId(1)
|
||||
{ }
|
||||
|
||||
GuildMgr::~GuildMgr()
|
||||
{
|
||||
@@ -121,6 +119,7 @@ void GuildMgr::LoadGuilds()
|
||||
delete guild;
|
||||
continue;
|
||||
}
|
||||
|
||||
AddGuild(guild);
|
||||
|
||||
++count;
|
||||
@@ -172,21 +171,18 @@ void GuildMgr::LoadGuilds()
|
||||
|
||||
// Delete orphaned guild member entries before loading the valid ones
|
||||
CharacterDatabase.DirectExecute("DELETE gm FROM guild_member gm LEFT JOIN guild g ON gm.guildId = g.guildId WHERE g.guildId IS NULL");
|
||||
CharacterDatabase.DirectExecute("DELETE gm FROM guild_member_withdraw gm LEFT JOIN guild_member g ON gm.guid = g.guid WHERE g.guid IS NULL");
|
||||
|
||||
// 0 1 2 3 4 5 6
|
||||
QueryResult result = CharacterDatabase.Query("SELECT guildid, gm.guid, rank, pnote, offnote, BankResetTimeMoney, BankRemMoney, "
|
||||
// 7 8 9 10 11 12
|
||||
"BankResetTimeTab0, BankRemSlotsTab0, BankResetTimeTab1, BankRemSlotsTab1, BankResetTimeTab2, BankRemSlotsTab2, "
|
||||
// 13 14 15 16 17 18
|
||||
"BankResetTimeTab3, BankRemSlotsTab3, BankResetTimeTab4, BankRemSlotsTab4, BankResetTimeTab5, BankRemSlotsTab5, "
|
||||
// 19 20 21 22 23 24
|
||||
"c.name, c.level, c.class, c.zone, c.account, c.logout_time "
|
||||
"FROM guild_member gm LEFT JOIN characters c ON c.guid = gm.guid ORDER BY guildid ASC");
|
||||
// 0 1 2 3 4 5 6 7 8 9 10
|
||||
QueryResult result = CharacterDatabase.Query("SELECT guildid, gm.guid, rank, pnote, offnote, w.tab0, w.tab1, w.tab2, w.tab3, w.tab4, w.tab5, "
|
||||
// 11 12 13 14 15 16 17
|
||||
"w.money, c.name, c.level, c.class, c.zone, c.account, c.logout_time "
|
||||
"FROM guild_member gm "
|
||||
"LEFT JOIN guild_member_withdraw w ON gm.guid = w.guid "
|
||||
"LEFT JOIN characters c ON c.guid = gm.guid ORDER BY guildid ASC");
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded 0 guild members. DB table `guild_member` is empty.");
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32 count = 0;
|
||||
@@ -215,7 +211,7 @@ void GuildMgr::LoadGuilds()
|
||||
// Delete orphaned guild bank right entries before loading the valid ones
|
||||
CharacterDatabase.DirectExecute("DELETE gbr FROM guild_bank_right gbr LEFT JOIN guild g ON gbr.guildId = g.guildId WHERE g.guildId IS NULL");
|
||||
|
||||
// 0 1 2 3 4
|
||||
// 0 1 2 3 4
|
||||
QueryResult result = CharacterDatabase.Query("SELECT guildid, TabId, rid, gbright, SlotPerDay FROM guild_bank_right ORDER BY guildid ASC, TabId ASC");
|
||||
|
||||
if (!result)
|
||||
@@ -382,20 +378,31 @@ void GuildMgr::LoadGuilds()
|
||||
sLog->outInfo(LOG_FILTER_GUILD, "Validating data of loaded guilds...");
|
||||
{
|
||||
uint32 oldMSTime = getMSTime();
|
||||
std::set<Guild*> rm; // temporary storage to avoid modifying GuildStore with RemoveGuild() while iterating
|
||||
|
||||
for (GuildContainer::iterator itr = GuildStore.begin(); itr != GuildStore.end(); ++itr)
|
||||
{
|
||||
Guild* guild = itr->second;
|
||||
if (guild)
|
||||
{
|
||||
if (!guild->Validate())
|
||||
{
|
||||
RemoveGuild(guild->GetId());
|
||||
delete guild;
|
||||
}
|
||||
}
|
||||
if (guild && !guild->Validate())
|
||||
rm.insert(guild);
|
||||
}
|
||||
|
||||
for (std::set<Guild*>::iterator itr = rm.begin(); itr != rm.end(); ++itr)
|
||||
{
|
||||
Guild* guild = *itr;
|
||||
RemoveGuild(guild->GetId());
|
||||
delete guild;
|
||||
}
|
||||
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Validated data of loaded guilds in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
}
|
||||
|
||||
void GuildMgr::ResetTimes()
|
||||
{
|
||||
for (GuildContainer::const_iterator itr = GuildStore.begin(); itr != GuildStore.end(); ++itr)
|
||||
if (Guild* guild = itr->second)
|
||||
guild->ResetTimes();
|
||||
|
||||
CharacterDatabase.DirectExecute("TRUNCATE guild_member_withdraw");
|
||||
}
|
||||
@@ -23,13 +23,12 @@
|
||||
class GuildMgr
|
||||
{
|
||||
friend class ACE_Singleton<GuildMgr, ACE_Null_Mutex>;
|
||||
|
||||
private:
|
||||
GuildMgr();
|
||||
~GuildMgr();
|
||||
|
||||
public:
|
||||
typedef UNORDERED_MAP<uint32, Guild*> GuildContainer;
|
||||
|
||||
Guild* GetGuildByLeader(uint64 guid) const;
|
||||
Guild* GetGuildById(uint32 guildId) const;
|
||||
Guild* GetGuildByName(std::string const& guildName) const;
|
||||
@@ -42,7 +41,9 @@ public:
|
||||
uint32 GenerateGuildId();
|
||||
void SetNextGuildId(uint32 Id) { NextGuildId = Id; }
|
||||
|
||||
void ResetTimes();
|
||||
protected:
|
||||
typedef UNORDERED_MAP<uint32, Guild*> GuildContainer;
|
||||
uint32 NextGuildId;
|
||||
GuildContainer GuildStore;
|
||||
};
|
||||
|
||||
@@ -152,7 +152,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recvData)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_ARENA_TEAM_INVITE");
|
||||
}
|
||||
|
||||
void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
|
||||
|
||||
@@ -185,7 +185,7 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
|
||||
arenaTeam->BroadcastEvent(ERR_ARENA_TEAM_JOIN_SS, _player->GetGUID(), 2, _player->GetName(), arenaTeam->GetName(), "");
|
||||
}
|
||||
|
||||
void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ARENA_TEAM_DECLINE"); // empty opcode
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
//post-incrementation is always slower than pre-incrementation !
|
||||
|
||||
//void called when player click on auctioneer npc
|
||||
void WorldSession::HandleAuctionHelloOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAuctionHelloOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid; //NPC guid
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
|
||||
if (!unit)
|
||||
@@ -113,12 +113,12 @@ void WorldSession::SendAuctionOwnerNotification(AuctionEntry* auction)
|
||||
}
|
||||
|
||||
//this void creates new auction and adds auction to some auctionhouse
|
||||
void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAuctionSellItem(WorldPacket & recvData)
|
||||
{
|
||||
uint64 auctioneer;
|
||||
uint32 itemsCount, etime, bid, buyout;
|
||||
recv_data >> auctioneer;
|
||||
recv_data >> itemsCount;
|
||||
recvData >> auctioneer;
|
||||
recvData >> itemsCount;
|
||||
|
||||
uint64 itemGUIDs[MAX_AUCTION_ITEMS]; // 160 slot = 4x 36 slot bag + backpack 16 slot
|
||||
uint32 count[MAX_AUCTION_ITEMS];
|
||||
@@ -131,16 +131,16 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
|
||||
|
||||
for (uint32 i = 0; i < itemsCount; ++i)
|
||||
{
|
||||
recv_data >> itemGUIDs[i];
|
||||
recv_data >> count[i];
|
||||
recvData >> itemGUIDs[i];
|
||||
recvData >> count[i];
|
||||
|
||||
if (!itemGUIDs[i] || !count[i] || count[i] > 1000 )
|
||||
return;
|
||||
}
|
||||
|
||||
recv_data >> bid;
|
||||
recv_data >> buyout;
|
||||
recv_data >> etime;
|
||||
recvData >> bid;
|
||||
recvData >> buyout;
|
||||
recvData >> etime;
|
||||
|
||||
if (!bid || !etime)
|
||||
return;
|
||||
@@ -354,15 +354,15 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//this function is called when client bids or buys out auction
|
||||
void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAuctionPlaceBid(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_PLACE_BID");
|
||||
|
||||
uint64 auctioneer;
|
||||
uint32 auctionId;
|
||||
uint32 price;
|
||||
recv_data >> auctioneer;
|
||||
recv_data >> auctionId >> price;
|
||||
recvData >> auctioneer;
|
||||
recvData >> auctionId >> price;
|
||||
|
||||
if (!auctionId || !price)
|
||||
return; //check for cheaters
|
||||
@@ -481,14 +481,14 @@ void WorldSession::HandleAuctionPlaceBid(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//this void is called when auction_owner cancels his auction
|
||||
void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAuctionRemoveItem(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_REMOVE_ITEM");
|
||||
|
||||
uint64 auctioneer;
|
||||
uint32 auctionId;
|
||||
recv_data >> auctioneer;
|
||||
recv_data >> auctionId;
|
||||
recvData >> auctioneer;
|
||||
recvData >> auctionId;
|
||||
//sLog->outDebug("Cancel AUCTION AuctionID: %u", auctionId);
|
||||
|
||||
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
|
||||
@@ -558,7 +558,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//called when player lists his bids
|
||||
void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAuctionListBidderItems(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_BIDDER_ITEMS");
|
||||
|
||||
@@ -566,12 +566,12 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
|
||||
uint32 listfrom; //page of auctions
|
||||
uint32 outbiddedCount; //count of outbidded auctions
|
||||
|
||||
recv_data >> guid;
|
||||
recv_data >> listfrom; // not used in fact (this list not have page control in client)
|
||||
recv_data >> outbiddedCount;
|
||||
if (recv_data.size() != (16 + outbiddedCount * 4))
|
||||
recvData >> guid;
|
||||
recvData >> listfrom; // not used in fact (this list not have page control in client)
|
||||
recvData >> outbiddedCount;
|
||||
if (recvData.size() != (16 + outbiddedCount * 4))
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recv_data.size(), (16 + outbiddedCount * 4));
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recvData.size(), (16 + outbiddedCount * 4));
|
||||
outbiddedCount = 0;
|
||||
}
|
||||
|
||||
@@ -579,7 +579,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
|
||||
if (!creature)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleAuctionListBidderItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
|
||||
recv_data.rfinish();
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -598,7 +598,7 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
|
||||
{
|
||||
--outbiddedCount;
|
||||
uint32 outbiddedAuctionId;
|
||||
recv_data >> outbiddedAuctionId;
|
||||
recvData >> outbiddedAuctionId;
|
||||
AuctionEntry* auction = auctionHouse->GetAuction(outbiddedAuctionId);
|
||||
if (auction && auction->BuildAuctionInfo(data))
|
||||
{
|
||||
@@ -615,15 +615,15 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//this void sends player info about his auctions
|
||||
void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_OWNER_ITEMS");
|
||||
|
||||
uint32 listfrom;
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> guid;
|
||||
recv_data >> listfrom; // not used in fact (this list not have page control in client)
|
||||
recvData >> guid;
|
||||
recvData >> listfrom; // not used in fact (this list not have page control in client)
|
||||
|
||||
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
|
||||
if (!creature)
|
||||
@@ -652,7 +652,7 @@ void WorldSession::HandleAuctionListOwnerItems(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//this void is called when player clicks on search button
|
||||
void WorldSession::HandleAuctionListItems(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAuctionListItems(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_ITEMS");
|
||||
|
||||
@@ -661,23 +661,23 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data)
|
||||
uint32 listfrom, auctionSlotID, auctionMainCategory, auctionSubCategory, quality;
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> guid;
|
||||
recv_data >> listfrom; // start, used for page control listing by 50 elements
|
||||
recv_data >> searchedname;
|
||||
recvData >> guid;
|
||||
recvData >> listfrom; // start, used for page control listing by 50 elements
|
||||
recvData >> searchedname;
|
||||
|
||||
recv_data >> levelmin >> levelmax;
|
||||
recv_data >> auctionSlotID >> auctionMainCategory >> auctionSubCategory;
|
||||
recv_data >> quality >> usable;
|
||||
recvData >> levelmin >> levelmax;
|
||||
recvData >> auctionSlotID >> auctionMainCategory >> auctionSubCategory;
|
||||
recvData >> quality >> usable;
|
||||
|
||||
recv_data.read_skip<uint8>(); // unk
|
||||
recvData.read_skip<uint8>(); // unk
|
||||
|
||||
// this block looks like it uses some lame byte packing or similar...
|
||||
uint8 unkCnt;
|
||||
recv_data >> unkCnt;
|
||||
recvData >> unkCnt;
|
||||
for (uint8 i = 0; i < unkCnt; i++)
|
||||
{
|
||||
recv_data.read_skip<uint8>();
|
||||
recv_data.read_skip<uint8>();
|
||||
recvData.read_skip<uint8>();
|
||||
recvData.read_skip<uint8>();
|
||||
}
|
||||
|
||||
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
|
||||
@@ -719,11 +719,11 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAuctionListPendingSales(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAuctionListPendingSales(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_AUCTION_LIST_PENDING_SALES");
|
||||
|
||||
recv_data.read_skip<uint64>();
|
||||
recvData.read_skip<uint64>();
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
#include "DisableMgr.h"
|
||||
#include "Group.h"
|
||||
|
||||
void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
|
||||
|
||||
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
|
||||
@@ -70,7 +70,7 @@ void WorldSession::SendBattleGroundList(uint64 guid, BattlegroundTypeId bgTypeId
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
uint32 bgTypeId_;
|
||||
@@ -79,10 +79,10 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
|
||||
bool isPremade = false;
|
||||
Group* grp = NULL;
|
||||
|
||||
recv_data >> guid; // battlemaster guid
|
||||
recv_data >> bgTypeId_; // battleground type id (DBC id)
|
||||
recv_data >> instanceId; // instance id, 0 if First Available selected
|
||||
recv_data >> joinAsGroup; // join as group
|
||||
recvData >> guid; // battlemaster guid
|
||||
recvData >> bgTypeId_; // battleground type id (DBC id)
|
||||
recvData >> instanceId; // instance id, 0 if First Available selected
|
||||
recvData >> joinAsGroup; // join as group
|
||||
|
||||
if (!sBattlemasterListStore.LookupEntry(bgTypeId_))
|
||||
{
|
||||
@@ -245,7 +245,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
|
||||
sBattlegroundMgr->ScheduleQueueUpdate(0, 0, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket& /*recv_data*/)
|
||||
void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd MSG_BATTLEGROUND_PLAYER_POSITIONS Message");
|
||||
|
||||
@@ -296,7 +296,7 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket& /*recv_d
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd MSG_PVP_LOG_DATA Message");
|
||||
|
||||
@@ -315,18 +315,18 @@ void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recv_data*/)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent MSG_PVP_LOG_DATA Message");
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recv_data)
|
||||
void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_LIST Message");
|
||||
|
||||
uint32 bgTypeId;
|
||||
recv_data >> bgTypeId; // id from DBC
|
||||
recvData >> bgTypeId; // id from DBC
|
||||
|
||||
uint8 fromWhere;
|
||||
recv_data >> fromWhere; // 0 - battlemaster (lua: ShowBattlefieldList), 1 - UI (lua: RequestBattlegroundInstanceInfo)
|
||||
recvData >> fromWhere; // 0 - battlemaster (lua: ShowBattlefieldList), 1 - UI (lua: RequestBattlegroundInstanceInfo)
|
||||
|
||||
uint8 canGainXP;
|
||||
recv_data >> canGainXP; // players with locked xp have their own bg queue on retail
|
||||
recvData >> canGainXP; // players with locked xp have their own bg queue on retail
|
||||
|
||||
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
|
||||
if (!bl)
|
||||
@@ -340,7 +340,7 @@ void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
|
||||
void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_BATTLEFIELD_PORT Message");
|
||||
|
||||
@@ -350,7 +350,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
|
||||
uint16 unk; // 0x1F90 constant?
|
||||
uint8 action; // enter battle 0x1, leave queue 0x0
|
||||
|
||||
recv_data >> type >> unk2 >> bgTypeId_ >> unk >> action;
|
||||
recvData >> type >> unk2 >> bgTypeId_ >> unk >> action;
|
||||
|
||||
if (!sBattlemasterListStore.LookupEntry(bgTypeId_))
|
||||
{
|
||||
@@ -492,14 +492,14 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleLeaveBattlefieldOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleLeaveBattlefieldOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_LEAVE_BATTLEFIELD Message");
|
||||
|
||||
recv_data.read_skip<uint8>(); // unk1
|
||||
recv_data.read_skip<uint8>(); // unk2
|
||||
recv_data.read_skip<uint32>(); // BattlegroundTypeId
|
||||
recv_data.read_skip<uint16>(); // unk3
|
||||
recvData.read_skip<uint8>(); // unk1
|
||||
recvData.read_skip<uint8>(); // unk2
|
||||
recvData.read_skip<uint32>(); // BattlegroundTypeId
|
||||
recvData.read_skip<uint16>(); // unk3
|
||||
|
||||
// not allow leave battleground in combat
|
||||
if (_player->isInCombat())
|
||||
@@ -510,7 +510,7 @@ void WorldSession::HandleLeaveBattlefieldOpcode(WorldPacket& recv_data)
|
||||
_player->LeaveBattleground();
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
// empty opcode
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Battleground status");
|
||||
@@ -574,7 +574,7 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
|
||||
|
||||
@@ -584,7 +584,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
|
||||
uint8 isRated; // isRated
|
||||
Group* grp = NULL;
|
||||
|
||||
recv_data >> guid >> arenaslot >> asGroup >> isRated;
|
||||
recvData >> guid >> arenaslot >> asGroup >> isRated;
|
||||
|
||||
// ignore if we already in BG or BG queue
|
||||
if (_player->InBattleground())
|
||||
@@ -742,10 +742,10 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
|
||||
sBattlegroundMgr->ScheduleQueueUpdate(matchmakerRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
|
||||
}
|
||||
|
||||
void WorldSession::HandleReportPvPAFK(WorldPacket & recv_data)
|
||||
void WorldSession::HandleReportPvPAFK(WorldPacket & recvData)
|
||||
{
|
||||
uint64 playerGuid;
|
||||
recv_data >> playerGuid;
|
||||
recvData >> playerGuid;
|
||||
Player* reportedPlayer = ObjectAccessor::FindPlayer(playerGuid);
|
||||
|
||||
if (!reportedPlayer)
|
||||
|
||||
@@ -230,7 +230,7 @@ void WorldSession::HandleCharEnum(PreparedQueryResult result)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleCharEnumOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleCharEnumOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
// remove expired bans
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_EXPIRED_BANS);
|
||||
@@ -249,20 +249,20 @@ void WorldSession::HandleCharEnumOpcode(WorldPacket & /*recv_data*/)
|
||||
_charEnumCallback = CharacterDatabase.AsyncQuery(stmt);
|
||||
}
|
||||
|
||||
void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleCharCreateOpcode(WorldPacket & recvData)
|
||||
{
|
||||
std::string name;
|
||||
uint8 race_, class_;
|
||||
|
||||
recv_data >> name;
|
||||
recvData >> name;
|
||||
|
||||
recv_data >> race_;
|
||||
recv_data >> class_;
|
||||
recvData >> race_;
|
||||
recvData >> class_;
|
||||
|
||||
// extract other data required for player creating
|
||||
uint8 gender, skin, face, hairStyle, hairColor, facialHair, outfitId;
|
||||
recv_data >> gender >> skin >> face;
|
||||
recv_data >> hairStyle >> hairColor >> facialHair >> outfitId;
|
||||
recvData >> gender >> skin >> face;
|
||||
recvData >> hairStyle >> hairColor >> facialHair >> outfitId;
|
||||
|
||||
WorldPacket data(SMSG_CHAR_CREATE, 1); // returned with diff.values in all cases
|
||||
|
||||
@@ -387,7 +387,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
delete _charCreateCallback.GetParam(); // Delete existing if any, to make the callback chain reset to stage 0
|
||||
_charCreateCallback.SetParam(new CharacterCreateInfo(name, race_, class_, gender, skin, face, hairStyle, hairColor, facialHair, outfitId, recv_data));
|
||||
_charCreateCallback.SetParam(new CharacterCreateInfo(name, race_, class_, gender, skin, face, hairStyle, hairColor, facialHair, outfitId, recvData));
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHECK_NAME);
|
||||
stmt->setString(0, name);
|
||||
_charCreateCallback.SetFutureResult(CharacterDatabase.AsyncQuery(stmt));
|
||||
@@ -670,10 +670,10 @@ void WorldSession::HandleCharCreateCallback(PreparedQueryResult result, Characte
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleCharDeleteOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
// can't delete loaded character
|
||||
if (ObjectAccessor::FindPlayer(guid))
|
||||
@@ -733,7 +733,7 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recvData)
|
||||
{
|
||||
if (PlayerLoading() || GetPlayer() != NULL)
|
||||
{
|
||||
@@ -746,7 +746,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recv_data)
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd Player Logon Message");
|
||||
|
||||
recv_data >> playerGuid;
|
||||
recvData >> playerGuid;
|
||||
|
||||
if (!CharCanLogin(GUID_LOPART(playerGuid)))
|
||||
{
|
||||
@@ -1002,30 +1002,30 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
|
||||
delete holder;
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetFactionAtWar(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSetFactionAtWar(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_FACTION_ATWAR");
|
||||
|
||||
uint32 repListID;
|
||||
uint8 flag;
|
||||
|
||||
recv_data >> repListID;
|
||||
recv_data >> flag;
|
||||
recvData >> repListID;
|
||||
recvData >> flag;
|
||||
|
||||
GetPlayer()->GetReputationMgr().SetAtWar(repListID, flag);
|
||||
}
|
||||
|
||||
//I think this function is never used :/ I dunno, but i guess this opcode not exists
|
||||
void WorldSession::HandleSetFactionCheat(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleSetFactionCheat(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "WORLD SESSION: HandleSetFactionCheat, not expected call, please report.");
|
||||
GetPlayer()->GetReputationMgr().SendStates();
|
||||
}
|
||||
|
||||
void WorldSession::HandleTutorialFlag(WorldPacket & recv_data)
|
||||
void WorldSession::HandleTutorialFlag(WorldPacket & recvData)
|
||||
{
|
||||
uint32 data;
|
||||
recv_data >> data;
|
||||
recvData >> data;
|
||||
|
||||
uint8 index = uint8(data / 32);
|
||||
if (index >= MAX_ACCOUNT_TUTORIAL_VALUES)
|
||||
@@ -1038,57 +1038,57 @@ void WorldSession::HandleTutorialFlag(WorldPacket & recv_data)
|
||||
SetTutorialInt(index, flag);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTutorialClear(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleTutorialClear(WorldPacket & /*recvData*/)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i)
|
||||
SetTutorialInt(i, 0xFFFFFFFF);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTutorialReset(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleTutorialReset(WorldPacket & /*recvData*/)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ACCOUNT_TUTORIAL_VALUES; ++i)
|
||||
SetTutorialInt(i, 0x00000000);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_WATCHED_FACTION");
|
||||
uint32 fact;
|
||||
recv_data >> fact;
|
||||
recvData >> fact;
|
||||
GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_FACTION_INACTIVE");
|
||||
uint32 replistid;
|
||||
uint8 inactive;
|
||||
recv_data >> replistid >> inactive;
|
||||
recvData >> replistid >> inactive;
|
||||
|
||||
_player->GetReputationMgr().SetInactive(replistid, inactive);
|
||||
}
|
||||
|
||||
void WorldSession::HandleShowingHelmOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleShowingHelmOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SHOWING_HELM for %s", _player->GetName().c_str());
|
||||
recv_data.read_skip<uint8>(); // unknown, bool?
|
||||
recvData.read_skip<uint8>(); // unknown, bool?
|
||||
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM);
|
||||
}
|
||||
|
||||
void WorldSession::HandleShowingCloakOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleShowingCloakOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_SHOWING_CLOAK for %s", _player->GetName().c_str());
|
||||
recv_data.read_skip<uint8>(); // unknown, bool?
|
||||
recvData.read_skip<uint8>(); // unknown, bool?
|
||||
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK);
|
||||
}
|
||||
|
||||
void WorldSession::HandleCharRenameOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleCharRenameOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
std::string newName;
|
||||
|
||||
recv_data >> guid;
|
||||
recv_data >> newName;
|
||||
recvData >> guid;
|
||||
recvData >> newName;
|
||||
|
||||
// prevent character rename to invalid name
|
||||
if (!normalizePlayerName(newName))
|
||||
@@ -1178,11 +1178,11 @@ void WorldSession::HandleChangePlayerNameOpcodeCallBack(PreparedQueryResult resu
|
||||
sWorld->UpdateCharacterNameData(guidLow, newName);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
|
||||
void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
// not accept declined names for unsupported languages
|
||||
std::string name;
|
||||
@@ -1217,7 +1217,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
|
||||
std::string name2;
|
||||
DeclinedName declinedname;
|
||||
|
||||
recv_data >> name2;
|
||||
recvData >> name2;
|
||||
|
||||
if (name2 != name) // character have different name
|
||||
{
|
||||
@@ -1230,7 +1230,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
|
||||
|
||||
for (int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
{
|
||||
recv_data >> declinedname.name[i];
|
||||
recvData >> declinedname.name[i];
|
||||
if (!normalizePlayerName(declinedname.name[i]))
|
||||
{
|
||||
WorldPacket data(SMSG_SET_PLAYER_DECLINED_NAMES_RESULT, 4+8);
|
||||
@@ -1275,12 +1275,12 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAlterAppearance(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAlterAppearance(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ALTER_APPEARANCE");
|
||||
|
||||
uint32 Hair, Color, FacialHair, SkinColor;
|
||||
recv_data >> Hair >> Color >> FacialHair >> SkinColor;
|
||||
recvData >> Hair >> Color >> FacialHair >> SkinColor;
|
||||
|
||||
BarberShopStyleEntry const* bs_hair = sBarberShopStyleStore.LookupEntry(Hair);
|
||||
|
||||
@@ -1347,10 +1347,10 @@ void WorldSession::HandleAlterAppearance(WorldPacket & recv_data)
|
||||
_player->SetStandState(0); // stand up
|
||||
}
|
||||
|
||||
void WorldSession::HandleRemoveGlyph(WorldPacket & recv_data)
|
||||
void WorldSession::HandleRemoveGlyph(WorldPacket & recvData)
|
||||
{
|
||||
uint32 slot;
|
||||
recv_data >> slot;
|
||||
recvData >> slot;
|
||||
|
||||
if (slot >= MAX_GLYPH_SLOT_INDEX)
|
||||
{
|
||||
@@ -1369,16 +1369,16 @@ void WorldSession::HandleRemoveGlyph(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
||||
void WorldSession::HandleCharCustomize(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
std::string newName;
|
||||
|
||||
recv_data >> guid;
|
||||
recv_data >> newName;
|
||||
recvData >> guid;
|
||||
recvData >> newName;
|
||||
|
||||
uint8 gender, skin, face, hairStyle, hairColor, facialHair;
|
||||
recv_data >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face;
|
||||
recvData >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face;
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_AT_LOGIN);
|
||||
|
||||
@@ -1485,23 +1485,23 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
|
||||
void WorldSession::HandleEquipmentSetSave(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_SAVE");
|
||||
|
||||
uint64 setGuid;
|
||||
recv_data.readPackGUID(setGuid);
|
||||
recvData.readPackGUID(setGuid);
|
||||
|
||||
uint32 index;
|
||||
recv_data >> index;
|
||||
recvData >> index;
|
||||
if (index >= MAX_EQUIPMENT_SET_INDEX) // client set slots amount
|
||||
return;
|
||||
|
||||
std::string name;
|
||||
recv_data >> name;
|
||||
recvData >> name;
|
||||
|
||||
std::string iconName;
|
||||
recv_data >> iconName;
|
||||
recvData >> iconName;
|
||||
|
||||
EquipmentSet eqSet;
|
||||
|
||||
@@ -1513,7 +1513,7 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
|
||||
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
{
|
||||
uint64 itemGuid;
|
||||
recv_data.readPackGUID(itemGuid);
|
||||
recvData.readPackGUID(itemGuid);
|
||||
|
||||
// equipment manager sends "1" (as raw GUID) for slots set to "ignore" (don't touch slot at equip set)
|
||||
if (itemGuid == 1)
|
||||
@@ -1537,17 +1537,17 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
|
||||
_player->SetEquipmentSet(index, eqSet);
|
||||
}
|
||||
|
||||
void WorldSession::HandleEquipmentSetDelete(WorldPacket &recv_data)
|
||||
void WorldSession::HandleEquipmentSetDelete(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_EQUIPMENT_SET_DELETE");
|
||||
|
||||
uint64 setGuid;
|
||||
recv_data.readPackGUID(setGuid);
|
||||
recvData.readPackGUID(setGuid);
|
||||
|
||||
_player->DeleteEquipmentSet(setGuid);
|
||||
}
|
||||
|
||||
void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
|
||||
void WorldSession::HandleEquipmentSetUse(WorldPacket &recvData)
|
||||
{
|
||||
if (_player->isInCombat())
|
||||
return;
|
||||
@@ -1557,10 +1557,10 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
|
||||
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
|
||||
{
|
||||
uint64 itemGuid;
|
||||
recv_data.readPackGUID(itemGuid);
|
||||
recvData.readPackGUID(itemGuid);
|
||||
|
||||
uint8 srcbag, srcslot;
|
||||
recv_data >> srcbag >> srcslot;
|
||||
recvData >> srcbag >> srcslot;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot);
|
||||
|
||||
@@ -1602,14 +1602,14 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
|
||||
void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
std::string newname;
|
||||
uint8 gender, skin, face, hairStyle, hairColor, facialHair, race;
|
||||
recv_data >> guid;
|
||||
recv_data >> newname;
|
||||
recv_data >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face >> race;
|
||||
recvData >> guid;
|
||||
recvData >> newname;
|
||||
recvData >> gender >> skin >> hairColor >> hairStyle >> facialHair >> face >> race;
|
||||
|
||||
uint32 lowGuid = GUID_LOPART(guid);
|
||||
|
||||
@@ -1634,7 +1634,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
|
||||
Field* fields = result->Fetch();
|
||||
uint32 at_loginFlags = fields[0].GetUInt16();
|
||||
char const* knownTitlesStr = fields[1].GetCString();
|
||||
uint32 used_loginFlag = ((recv_data.GetOpcode() == CMSG_CHAR_RACE_CHANGE) ? AT_LOGIN_CHANGE_RACE : AT_LOGIN_CHANGE_FACTION);
|
||||
uint32 used_loginFlag = ((recvData.GetOpcode() == CMSG_CHAR_RACE_CHANGE) ? AT_LOGIN_CHANGE_RACE : AT_LOGIN_CHANGE_FACTION);
|
||||
|
||||
if (!sObjectMgr->GetPlayerInfo(race, playerClass))
|
||||
{
|
||||
@@ -1793,7 +1793,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
|
||||
trans->Append(stmt);
|
||||
}
|
||||
|
||||
if (recv_data.GetOpcode() == CMSG_CHAR_FACTION_CHANGE)
|
||||
if (recvData.GetOpcode() == CMSG_CHAR_FACTION_CHANGE)
|
||||
{
|
||||
// Delete all Flypaths
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_CHAR_TAXI_PATH);
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
#include "Vehicle.h"
|
||||
#include "VehicleDefines.h"
|
||||
|
||||
void WorldSession::HandleAttackSwingOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleAttackSwingOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_ATTACKSWING Message guidlow:%u guidhigh:%u", GUID_LOPART(guid), GUID_HIPART(guid));
|
||||
|
||||
@@ -66,15 +66,15 @@ void WorldSession::HandleAttackSwingOpcode(WorldPacket& recv_data)
|
||||
_player->Attack(pEnemy, true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAttackStopOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleAttackStopOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
GetPlayer()->AttackStop();
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetSheathedOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleSetSheathedOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint32 sheathed;
|
||||
recv_data >> sheathed;
|
||||
recvData >> sheathed;
|
||||
|
||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: Recvd CMSG_SETSHEATHED Message guidlow:%u value1:%u", GetPlayer()->GetGUIDLow(), sheathed);
|
||||
|
||||
|
||||
@@ -56,13 +56,13 @@ void WorldSession::SendPartyResult(PartyOperation operation, const std::string&
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGroupInviteOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_INVITE");
|
||||
|
||||
std::string membername;
|
||||
recv_data >> membername;
|
||||
recv_data.read_skip<uint32>();
|
||||
recvData >> membername;
|
||||
recvData.read_skip<uint32>();
|
||||
|
||||
// attempt add selected player
|
||||
|
||||
@@ -195,11 +195,11 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data)
|
||||
SendPartyResult(PARTY_OP_INVITE, membername, ERR_PARTY_RESULT_OK);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_ACCEPT");
|
||||
|
||||
recv_data.read_skip<uint32>();
|
||||
recvData.read_skip<uint32>();
|
||||
Group* group = GetPlayer()->GetGroupInvite();
|
||||
|
||||
if (!group)
|
||||
@@ -247,7 +247,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recv_data)
|
||||
group->BroadcastGroupUpdate();
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_DECLINE");
|
||||
|
||||
@@ -270,14 +270,14 @@ void WorldSession::HandleGroupDeclineOpcode(WorldPacket & /*recv_data*/)
|
||||
leader->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_UNINVITE_GUID");
|
||||
|
||||
uint64 guid;
|
||||
std::string reason;
|
||||
recv_data >> guid;
|
||||
recv_data >> reason;
|
||||
recvData >> guid;
|
||||
recvData >> reason;
|
||||
|
||||
//can't uninvite yourself
|
||||
if (guid == GetPlayer()->GetGUID())
|
||||
@@ -319,12 +319,12 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recv_data)
|
||||
SendPartyResult(PARTY_OP_UNINVITE, "", ERR_TARGET_NOT_IN_GROUP_S);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_UNINVITE");
|
||||
|
||||
std::string membername;
|
||||
recv_data >> membername;
|
||||
recvData >> membername;
|
||||
|
||||
// player not found
|
||||
if (!normalizePlayerName(membername))
|
||||
@@ -364,12 +364,12 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data)
|
||||
SendPartyResult(PARTY_OP_UNINVITE, membername, ERR_TARGET_NOT_IN_GROUP_S);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_SET_LEADER");
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
Player* player = ObjectAccessor::FindPlayer(guid);
|
||||
Group* group = GetPlayer()->GetGroup();
|
||||
@@ -385,7 +385,7 @@ void WorldSession::HandleGroupSetLeaderOpcode(WorldPacket & recv_data)
|
||||
group->SendUpdate();
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupDisbandOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleGroupDisbandOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_DISBAND");
|
||||
|
||||
@@ -408,14 +408,14 @@ void WorldSession::HandleGroupDisbandOpcode(WorldPacket & /*recv_data*/)
|
||||
GetPlayer()->RemoveFromGroup(GROUP_REMOVEMETHOD_LEAVE);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLootMethodOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleLootMethodOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_LOOT_METHOD");
|
||||
|
||||
uint32 lootMethod;
|
||||
uint64 lootMaster;
|
||||
uint32 lootThreshold;
|
||||
recv_data >> lootMethod >> lootMaster >> lootThreshold;
|
||||
recvData >> lootMethod >> lootMaster >> lootThreshold;
|
||||
|
||||
Group* group = GetPlayer()->GetGroup();
|
||||
if (!group)
|
||||
@@ -459,7 +459,7 @@ void WorldSession::HandleLootRoll(WorldPacket& recvData)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleMinimapPingOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleMinimapPingOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_MINIMAP_PING");
|
||||
|
||||
@@ -467,8 +467,8 @@ void WorldSession::HandleMinimapPingOpcode(WorldPacket& recv_data)
|
||||
return;
|
||||
|
||||
float x, y;
|
||||
recv_data >> x;
|
||||
recv_data >> y;
|
||||
recvData >> x;
|
||||
recvData >> y;
|
||||
|
||||
//sLog->outDebug("Received opcode MSG_MINIMAP_PING X: %f, Y: %f", x, y);
|
||||
|
||||
@@ -483,13 +483,13 @@ void WorldSession::HandleMinimapPingOpcode(WorldPacket& recv_data)
|
||||
GetPlayer()->GetGroup()->BroadcastPacket(&data, true, -1, GetPlayer()->GetGUID());
|
||||
}
|
||||
|
||||
void WorldSession::HandleRandomRollOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleRandomRollOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RANDOM_ROLL");
|
||||
|
||||
uint32 minimum, maximum, roll;
|
||||
recv_data >> minimum;
|
||||
recv_data >> maximum;
|
||||
recvData >> minimum;
|
||||
recvData >> maximum;
|
||||
|
||||
/** error handling **/
|
||||
if (minimum > maximum || maximum > 10000) // < 32768 for urand call
|
||||
@@ -512,7 +512,7 @@ void WorldSession::HandleRandomRollOpcode(WorldPacket& recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RAID_TARGET_UPDATE");
|
||||
|
||||
@@ -521,7 +521,7 @@ void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
|
||||
uint8 x;
|
||||
recv_data >> x;
|
||||
recvData >> x;
|
||||
|
||||
/** error handling **/
|
||||
/********************/
|
||||
@@ -537,12 +537,12 @@ void WorldSession::HandleRaidTargetUpdateOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
group->SetTargetIcon(x, _player->GetGUID(), guid);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupRaidConvertOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleGroupRaidConvertOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_RAID_CONVERT");
|
||||
|
||||
@@ -563,7 +563,7 @@ void WorldSession::HandleGroupRaidConvertOpcode(WorldPacket & /*recv_data*/)
|
||||
group->ConvertToRaid();
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_CHANGE_SUB_GROUP");
|
||||
|
||||
@@ -574,8 +574,8 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
|
||||
|
||||
std::string name;
|
||||
uint8 groupNr;
|
||||
recv_data >> name;
|
||||
recv_data >> groupNr;
|
||||
recvData >> name;
|
||||
recvData >> groupNr;
|
||||
|
||||
if (groupNr >= MAX_RAID_SUBGROUPS)
|
||||
return;
|
||||
@@ -602,7 +602,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data)
|
||||
group->ChangeMembersGroup(guid, groupNr);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GROUP_ASSISTANT_LEADER");
|
||||
|
||||
@@ -615,15 +615,15 @@ void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recv_data)
|
||||
|
||||
uint64 guid;
|
||||
bool apply;
|
||||
recv_data >> guid;
|
||||
recv_data >> apply;
|
||||
recvData >> guid;
|
||||
recvData >> apply;
|
||||
|
||||
group->SetGroupMemberFlag(guid, apply, MEMBER_FLAG_ASSISTANT);
|
||||
|
||||
group->SendUpdate();
|
||||
}
|
||||
|
||||
void WorldSession::HandlePartyAssignmentOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePartyAssignmentOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_PARTY_ASSIGNMENT");
|
||||
|
||||
@@ -638,8 +638,8 @@ void WorldSession::HandlePartyAssignmentOpcode(WorldPacket & recv_data)
|
||||
uint8 assignment;
|
||||
bool apply;
|
||||
uint64 guid;
|
||||
recv_data >> assignment >> apply;
|
||||
recv_data >> guid;
|
||||
recvData >> assignment >> apply;
|
||||
recvData >> guid;
|
||||
|
||||
switch (assignment)
|
||||
{
|
||||
@@ -657,7 +657,7 @@ void WorldSession::HandlePartyAssignmentOpcode(WorldPacket & recv_data)
|
||||
group->SendUpdate();
|
||||
}
|
||||
|
||||
void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_RAID_READY_CHECK");
|
||||
|
||||
@@ -665,7 +665,7 @@ void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket & recv_data)
|
||||
if (!group)
|
||||
return;
|
||||
|
||||
if (recv_data.empty()) // request
|
||||
if (recvData.empty()) // request
|
||||
{
|
||||
/** error handling **/
|
||||
if (!group->IsLeader(GetPlayer()->GetGUID()) && !group->IsAssistant(GetPlayer()->GetGUID()))
|
||||
@@ -682,7 +682,7 @@ void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket & recv_data)
|
||||
else // answer
|
||||
{
|
||||
uint8 state;
|
||||
recv_data >> state;
|
||||
recvData >> state;
|
||||
|
||||
// everything's fine, do it
|
||||
WorldPacket data(MSG_RAID_READY_CHECK_CONFIRM, 9);
|
||||
@@ -692,7 +692,7 @@ void WorldSession::HandleRaidReadyCheckOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleRaidReadyCheckFinishedOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleRaidReadyCheckFinishedOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
//Group* group = GetPlayer()->GetGroup();
|
||||
//if (!group)
|
||||
@@ -872,11 +872,11 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player* player, WorldPacke
|
||||
}
|
||||
|
||||
/*this procedure handles clients CMSG_REQUEST_PARTY_MEMBER_STATS request*/
|
||||
void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data)
|
||||
void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_REQUEST_PARTY_MEMBER_STATS");
|
||||
uint64 Guid;
|
||||
recv_data >> Guid;
|
||||
recvData >> Guid;
|
||||
|
||||
Player* player = HashMapHolder<Player>::Find(Guid);
|
||||
if (!player)
|
||||
@@ -962,23 +962,23 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
/*!*/void WorldSession::HandleRequestRaidInfoOpcode(WorldPacket & /*recv_data*/)
|
||||
/*!*/void WorldSession::HandleRequestRaidInfoOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
// every time the player checks the character screen
|
||||
_player->SendRaidInfo();
|
||||
}
|
||||
|
||||
/*void WorldSession::HandleGroupCancelOpcode(WorldPacket & recv_data)
|
||||
/*void WorldSession::HandleGroupCancelOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug("WORLD: got CMSG_GROUP_CANCEL.");
|
||||
}*/
|
||||
|
||||
void WorldSession::HandleOptOutOfLootOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleOptOutOfLootOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_OPT_OUT_OF_LOOT");
|
||||
|
||||
uint32 passOnLoot;
|
||||
recv_data >> passOnLoot; // 1 always pass, 0 do not pass
|
||||
recvData >> passOnLoot; // 1 always pass, 0 do not pass
|
||||
|
||||
// ignore if player not loaded
|
||||
if (!GetPlayer()) // needed because STATUS_AUTHED
|
||||
|
||||
@@ -28,29 +28,17 @@
|
||||
#include "GossipDef.h"
|
||||
#include "SocialMgr.h"
|
||||
|
||||
// Helper for getting guild object of session's player.
|
||||
// If guild does not exist, sends error (if necessary).
|
||||
inline Guild* _GetPlayerGuild(WorldSession* session, bool sendError = false)
|
||||
{
|
||||
if (uint32 guildId = session->GetPlayer()->GetGuildId()) // If guild id = 0, player is not in guild
|
||||
if (Guild* guild = sGuildMgr->GetGuildById(guildId)) // Find guild by id
|
||||
return guild;
|
||||
if (sendError)
|
||||
Guild::SendCommandResult(session, GUILD_CREATE_S, ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_QUERY");
|
||||
|
||||
uint32 guildId;
|
||||
recvPacket >> guildId;
|
||||
// Use received guild id to access guild method (not player's guild id)
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_QUERY [%s]: Guild: %u", GetPlayerInfo().c_str(), guildId);
|
||||
if (!guildId)
|
||||
return;
|
||||
|
||||
if (Guild* guild = sGuildMgr->GetGuildById(guildId))
|
||||
guild->HandleQuery(this);
|
||||
else
|
||||
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
|
||||
@@ -72,41 +60,39 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
|
||||
|
||||
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_INVITE");
|
||||
|
||||
std::string invitedName;
|
||||
recvPacket >> invitedName;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_INVITE [%s]: Invited: %s", GetPlayerInfo().c_str(), invitedName.c_str());
|
||||
if (normalizePlayerName(invitedName))
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleInviteMember(this, invitedName);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_REMOVE");
|
||||
|
||||
std::string playerName;
|
||||
recvPacket >> playerName;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_REMOVE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
|
||||
|
||||
if (normalizePlayerName(playerName))
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleRemoveMember(this, playerName);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_ACCEPT");
|
||||
// Player cannot be in guild
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_ACCEPT [%s]", GetPlayer()->GetName().c_str());
|
||||
|
||||
if (!GetPlayer()->GetGuildId())
|
||||
// Guild where player was invited must exist
|
||||
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildIdInvited()))
|
||||
guild->HandleAcceptMember(this);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_DECLINE");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_DECLINE [%s]", GetPlayerInfo().c_str());
|
||||
|
||||
GetPlayer()->SetGuildIdInvited(0);
|
||||
GetPlayer()->SetInGuild(0);
|
||||
@@ -114,125 +100,115 @@ void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
|
||||
|
||||
void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_INFO");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_INFO [%s]", GetPlayerInfo().c_str());
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->SendInfo(this);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_ROSTER");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_ROSTER [%s]", GetPlayerInfo().c_str());
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleRoster(this);
|
||||
else
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_ROSTER, ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_PROMOTE");
|
||||
|
||||
std::string playerName;
|
||||
recvPacket >> playerName;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_PROMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
|
||||
|
||||
if (normalizePlayerName(playerName))
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleUpdateMemberRank(this, playerName, false);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_DEMOTE");
|
||||
|
||||
std::string playerName;
|
||||
recvPacket >> playerName;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_DEMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
|
||||
|
||||
if (normalizePlayerName(playerName))
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleUpdateMemberRank(this, playerName, true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_LEAVE");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_LEAVE [%s]", GetPlayerInfo().c_str());
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleLeaveMember(this);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_DISBAND");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_DISBAND [%s]", GetPlayerInfo().c_str());
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleDisband(this);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_LEADER");
|
||||
|
||||
std::string name;
|
||||
recvPacket >> name;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_LEADER [%s]: Target: %s", GetPlayerInfo().c_str(), name.c_str());
|
||||
|
||||
if (normalizePlayerName(name))
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleSetLeader(this, name);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_MOTD");
|
||||
std::string motd;
|
||||
recvPacket >> motd;
|
||||
|
||||
std::string motd; // Empty by default
|
||||
if (!recvPacket.empty())
|
||||
recvPacket >> motd;
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_MOTD [%s]: MOTD: %s", GetPlayerInfo().c_str(), motd.c_str());
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleSetMOTD(this, motd);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_SET_PUBLIC_NOTE");
|
||||
|
||||
std::string playerName;
|
||||
recvPacket >> playerName;
|
||||
std::string note;
|
||||
recvPacket >> playerName >> note;
|
||||
|
||||
std::string publicNote;
|
||||
recvPacket >> publicNote;
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_SET_PUBLIC_NOTE [%s]: Target: %s, Note: %s",
|
||||
GetPlayerInfo().c_str(), playerName.c_str(), note.c_str());
|
||||
|
||||
if (normalizePlayerName(playerName))
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
guild->HandleSetMemberNote(this, playerName, publicNote, false);
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleSetMemberNote(this, playerName, note, true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_SET_OFFICER_NOTE");
|
||||
|
||||
std::string playerName;
|
||||
recvPacket >> playerName;
|
||||
std::string note;
|
||||
recvPacket >> playerName >> note;
|
||||
|
||||
std::string officerNote;
|
||||
recvPacket >> officerNote;
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_SET_OFFICER_NOTE [%s]: Target: %s, Note: %s",
|
||||
GetPlayerInfo().c_str(), playerName.c_str(), note.c_str());
|
||||
|
||||
if (normalizePlayerName(playerName))
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
guild->HandleSetMemberNote(this, playerName, officerNote, true);
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleSetMemberNote(this, playerName, note, false);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_RANK");
|
||||
|
||||
Guild* guild = _GetPlayerGuild(this, true);
|
||||
if (!guild)
|
||||
{
|
||||
recvPacket.rpos(recvPacket.wpos());
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 rankId;
|
||||
recvPacket >> rankId;
|
||||
|
||||
@@ -245,7 +221,17 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
|
||||
uint32 money;
|
||||
recvPacket >> money;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_RANK [%s]: Rank: %s (%u)", GetPlayerInfo().c_str(), rankName.c_str(), rankId);
|
||||
|
||||
Guild* guild = GetPlayer()->GetGuild();
|
||||
if (!guild)
|
||||
{
|
||||
recvPacket.rpos(recvPacket.wpos());
|
||||
return;
|
||||
}
|
||||
|
||||
GuildBankRightsAndSlotsVec rightsAndSlots(GUILD_BANK_MAX_TABS);
|
||||
|
||||
for (uint8 tabId = 0; tabId < GUILD_BANK_MAX_TABS; ++tabId)
|
||||
{
|
||||
uint32 bankRights;
|
||||
@@ -254,7 +240,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
|
||||
recvPacket >> bankRights;
|
||||
recvPacket >> slots;
|
||||
|
||||
rightsAndSlots[tabId] = GuildBankRightsAndSlots(uint8(bankRights), slots);
|
||||
rightsAndSlots[tabId] = GuildBankRightsAndSlots(tabId, bankRights, slots);
|
||||
}
|
||||
|
||||
guild->HandleSetRankInfo(this, rankId, rankName, rights, money, rightsAndSlots);
|
||||
@@ -262,181 +248,175 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
|
||||
|
||||
void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_ADD_RANK");
|
||||
|
||||
std::string rankName;
|
||||
recvPacket >> rankName;
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_ADD_RANK [%s]: Rank: %s", GetPlayerInfo().c_str(), rankName.c_str());
|
||||
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleAddNewRank(this, rankName);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_DEL_RANK");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_DEL_RANK [%s]", GetPlayerInfo().c_str());
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleRemoveLowestRank(this);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_INFO_TEXT");
|
||||
|
||||
std::string info;
|
||||
recvPacket >> info;
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this, true))
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_INFO_TEXT [%s]: %s", GetPlayerInfo().c_str(), info.c_str());
|
||||
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleSetInfo(this, info);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_SAVE_GUILD_EMBLEM");
|
||||
|
||||
uint64 vendorGuid;
|
||||
recvPacket >> vendorGuid;
|
||||
|
||||
EmblemInfo emblemInfo;
|
||||
emblemInfo.ReadPacket(recvPacket);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "MSG_SAVE_GUILD_EMBLEM [%s]: Guid: [" UI64FMTD
|
||||
"] Style: %d, Color: %d, BorderStyle: %d, BorderColor: %d, BackgroundColor: %d"
|
||||
, GetPlayerInfo().c_str(), vendorGuid, emblemInfo.GetStyle()
|
||||
, emblemInfo.GetColor(), emblemInfo.GetBorderStyle()
|
||||
, emblemInfo.GetBorderColor(), emblemInfo.GetBackgroundColor());
|
||||
|
||||
if (GetPlayer()->GetNPCIfCanInteractWith(vendorGuid, UNIT_NPC_FLAG_TABARDDESIGNER))
|
||||
{
|
||||
// Remove fake death
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleSetEmblem(this, emblemInfo);
|
||||
else
|
||||
// "You are not part of a guild!";
|
||||
Guild::SendSaveEmblemResult(this, ERR_GUILDEMBLEM_NOGUILD);
|
||||
Guild::SendSaveEmblemResult(this, ERR_GUILDEMBLEM_NOGUILD); // "You are not part of a guild!";
|
||||
}
|
||||
else
|
||||
{
|
||||
// "That's not an emblem vendor!"
|
||||
Guild::SendSaveEmblemResult(this, ERR_GUILDEMBLEM_INVALIDVENDOR);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleSaveGuildEmblemOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(vendorGuid));
|
||||
}
|
||||
Guild::SendSaveEmblemResult(this, ERR_GUILDEMBLEM_INVALIDVENDOR); // "That's not an emblem vendor!"
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (MSG_GUILD_EVENT_LOG_QUERY)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "MSG_GUILD_EVENT_LOG_QUERY [%s]", GetPlayerInfo().c_str());
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->SendEventLog(this);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recv_data */)
|
||||
void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recvData */)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (MSG_GUILD_BANK_MONEY_WITHDRAWN)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "MSG_GUILD_BANK_MONEY_WITHDRAWN [%s]", GetPlayerInfo().c_str());
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->SendMoneyInfo(this);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildPermissions(WorldPacket& /* recv_data */)
|
||||
void WorldSession::HandleGuildPermissions(WorldPacket& /* recvData */)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (MSG_GUILD_PERMISSIONS)");
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "MSG_GUILD_PERMISSIONS [%s]", GetPlayerInfo().c_str());
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->SendPermissions(this);
|
||||
}
|
||||
|
||||
// Called when clicking on Guild bank gameobject
|
||||
void WorldSession::HandleGuildBankerActivate(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGuildBankerActivate(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANKER_ACTIVATE)");
|
||||
uint64 guid;
|
||||
bool sendAllSlots;
|
||||
recvData >> guid >> sendAllSlots;
|
||||
|
||||
uint64 GoGuid;
|
||||
recv_data >> GoGuid;
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANKER_ACTIVATE [%s]: Go: [" UI64FMTD "] AllSlots: %u"
|
||||
, GetPlayerInfo().c_str(), guid, sendAllSlots);
|
||||
|
||||
uint8 fullSlotList;
|
||||
recv_data >> fullSlotList; // 0 = only slots updated in last operation are shown. 1 = all slots updated
|
||||
|
||||
if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
Guild * const guild = GetPlayer()->GetGuild();
|
||||
if (!guild)
|
||||
{
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
guild->SendBankTabsInfo(this);
|
||||
else
|
||||
Guild::SendCommandResult(this, GUILD_UNK1, ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
}
|
||||
}
|
||||
|
||||
// Called when opening guild bank tab only (first one)
|
||||
void WorldSession::HandleGuildBankQueryTab(WorldPacket & recv_data)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_QUERY_TAB)");
|
||||
|
||||
uint64 GoGuid;
|
||||
recv_data >> GoGuid;
|
||||
|
||||
uint8 tabId;
|
||||
recv_data >> tabId;
|
||||
|
||||
uint8 fullSlotList;
|
||||
recv_data >> fullSlotList; // 0 = only slots updated in last operation are shown. 1 = all slots updated
|
||||
|
||||
if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
guild->SendBankTabData(this, tabId);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankDepositMoney(WorldPacket & recv_data)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_DEPOSIT_MONEY)");
|
||||
|
||||
uint64 GoGuid;
|
||||
recv_data >> GoGuid;
|
||||
|
||||
uint32 money;
|
||||
recv_data >> money;
|
||||
|
||||
if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
if (money && GetPlayer()->HasEnoughMoney(money))
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
guild->HandleMemberDepositMoney(this, money);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket & recv_data)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_WITHDRAW_MONEY)");
|
||||
|
||||
uint64 GoGuid;
|
||||
recv_data >> GoGuid;
|
||||
|
||||
uint32 money;
|
||||
recv_data >> money;
|
||||
|
||||
if (money)
|
||||
if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
guild->HandleMemberWithdrawMoney(this, money);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_SWAP_ITEMS)");
|
||||
|
||||
uint64 GoGuid;
|
||||
recv_data >> GoGuid;
|
||||
|
||||
if (!GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
{
|
||||
recv_data.rfinish(); // Prevent additional spam at rejected packet
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_VIEW_TAB, ERR_GUILD_PLAYER_NOT_IN_GUILD);
|
||||
return;
|
||||
}
|
||||
|
||||
Guild* guild = _GetPlayerGuild(this);
|
||||
guild->SendBankTabsInfo(this, sendAllSlots);
|
||||
}
|
||||
|
||||
// Called when opening guild bank tab only (first one)
|
||||
void WorldSession::HandleGuildBankQueryTab(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
uint8 tabId;
|
||||
bool full;
|
||||
|
||||
recvData >> guid >> tabId >> full;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_QUERY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, ShowTabs: %u"
|
||||
, GetPlayerInfo().c_str(), guid, tabId, full);
|
||||
|
||||
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->SendBankTabData(this, tabId);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankDepositMoney(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
uint32 money;
|
||||
recvData >> guid >> money;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_DEPOSIT_MONEY [%s]: Go: [" UI64FMTD "], money: %u",
|
||||
GetPlayerInfo().c_str(), guid, money);
|
||||
|
||||
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
if (money && GetPlayer()->HasEnoughMoney(money))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleMemberDepositMoney(this, money);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
uint32 money;
|
||||
recvData >> guid >> money;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_WITHDRAW_MONEY [%s]: Go: [" UI64FMTD "], money: %u",
|
||||
GetPlayerInfo().c_str(), guid, money);
|
||||
|
||||
if (money && GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleMemberWithdrawMoney(this, money);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankSwapItems(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_SWAP_ITEMS [%s]", GetPlayerInfo().c_str());
|
||||
|
||||
uint64 GoGuid;
|
||||
recvData >> GoGuid;
|
||||
|
||||
if (!GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
{
|
||||
recvData.rfinish(); // Prevent additional spam at rejected packet
|
||||
return;
|
||||
}
|
||||
|
||||
Guild* guild = GetPlayer()->GetGuild();
|
||||
if (!guild)
|
||||
{
|
||||
recv_data.rfinish(); // Prevent additional spam at rejected packet
|
||||
recvData.rfinish(); // Prevent additional spam at rejected packet
|
||||
return;
|
||||
}
|
||||
|
||||
uint8 bankToBank;
|
||||
recv_data >> bankToBank;
|
||||
recvData >> bankToBank;
|
||||
|
||||
uint8 tabId;
|
||||
uint8 slotId;
|
||||
@@ -446,18 +426,18 @@ void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data)
|
||||
if (bankToBank)
|
||||
{
|
||||
uint8 destTabId;
|
||||
recv_data >> destTabId;
|
||||
recvData >> destTabId;
|
||||
|
||||
uint8 destSlotId;
|
||||
recv_data >> destSlotId;
|
||||
recv_data.read_skip<uint32>(); // Always 0
|
||||
recvData >> destSlotId;
|
||||
recvData.read_skip<uint32>(); // Always 0
|
||||
|
||||
recv_data >> tabId;
|
||||
recv_data >> slotId;
|
||||
recv_data >> itemEntry;
|
||||
recv_data.read_skip<uint8>(); // Always 0
|
||||
recvData >> tabId;
|
||||
recvData >> slotId;
|
||||
recvData >> itemEntry;
|
||||
recvData.read_skip<uint8>(); // Always 0
|
||||
|
||||
recv_data >> splitedAmount;
|
||||
recvData >> splitedAmount;
|
||||
|
||||
guild->SwapItems(GetPlayer(), tabId, slotId, destTabId, destSlotId, splitedAmount);
|
||||
}
|
||||
@@ -467,24 +447,24 @@ void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data)
|
||||
uint8 playerSlotId = NULL_SLOT;
|
||||
uint8 toChar = 1;
|
||||
|
||||
recv_data >> tabId;
|
||||
recv_data >> slotId;
|
||||
recv_data >> itemEntry;
|
||||
recvData >> tabId;
|
||||
recvData >> slotId;
|
||||
recvData >> itemEntry;
|
||||
|
||||
uint8 autoStore;
|
||||
recv_data >> autoStore;
|
||||
recvData >> autoStore;
|
||||
if (autoStore)
|
||||
{
|
||||
recv_data.read_skip<uint32>(); // autoStoreCount
|
||||
recv_data.read_skip<uint8>(); // ToChar (?), always and expected to be 1 (autostore only triggered in Bank -> Char)
|
||||
recv_data.read_skip<uint32>(); // Always 0
|
||||
recvData.read_skip<uint32>(); // autoStoreCount
|
||||
recvData.read_skip<uint8>(); // ToChar (?), always and expected to be 1 (autostore only triggered in Bank -> Char)
|
||||
recvData.read_skip<uint32>(); // Always 0
|
||||
}
|
||||
else
|
||||
{
|
||||
recv_data >> playerBag;
|
||||
recv_data >> playerSlotId;
|
||||
recv_data >> toChar;
|
||||
recv_data >> splitedAmount;
|
||||
recvData >> playerBag;
|
||||
recvData >> playerSlotId;
|
||||
recvData >> toChar;
|
||||
recvData >> splitedAmount;
|
||||
}
|
||||
|
||||
// Player <-> Bank
|
||||
@@ -496,75 +476,68 @@ void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankBuyTab(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGuildBankBuyTab(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_BUY_TAB)");
|
||||
|
||||
uint64 GoGuid;
|
||||
recv_data >> GoGuid;
|
||||
|
||||
uint64 guid;
|
||||
uint8 tabId;
|
||||
recv_data >> tabId;
|
||||
|
||||
if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
recvData >> guid >> tabId;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_BUY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u", GetPlayerInfo().c_str(), guid, tabId);
|
||||
|
||||
|
||||
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleBuyBankTab(this, tabId);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankUpdateTab(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGuildBankUpdateTab(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (CMSG_GUILD_BANK_UPDATE_TAB)");
|
||||
|
||||
uint64 GoGuid;
|
||||
recv_data >> GoGuid;
|
||||
|
||||
uint64 guid;
|
||||
uint8 tabId;
|
||||
recv_data >> tabId;
|
||||
std::string name, icon;
|
||||
|
||||
std::string name;
|
||||
recv_data >> name;
|
||||
recvData >> guid >> tabId >> name >> icon;
|
||||
|
||||
std::string icon;
|
||||
recv_data >> icon;
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_UPDATE_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, Name: %s, Icon: %s"
|
||||
, GetPlayerInfo().c_str(), guid, tabId, name.c_str(), icon.c_str());
|
||||
|
||||
if (!name.empty() && !icon.empty())
|
||||
if (GetPlayer()->GetGameObjectIfCanInteractWith(GoGuid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->HandleSetBankTabInfo(this, tabId, name, icon);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankLogQuery(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGuildBankLogQuery(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received (MSG_GUILD_BANK_LOG_QUERY)");
|
||||
|
||||
uint8 tabId;
|
||||
recv_data >> tabId;
|
||||
recvData >> tabId;
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "MSG_GUILD_BANK_LOG_QUERY [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
|
||||
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->SendBankLog(this, tabId);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data)
|
||||
void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_QUERY_GUILD_BANK_TEXT");
|
||||
|
||||
uint8 tabId;
|
||||
recv_data >> tabId;
|
||||
recvData >> tabId;
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "MSG_QUERY_GUILD_BANK_TEXT [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
|
||||
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->SendBankTabText(this, tabId);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetGuildBankTabText(WorldPacket &recv_data)
|
||||
void WorldSession::HandleSetGuildBankTabText(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SET_GUILD_BANK_TEXT");
|
||||
|
||||
uint8 tabId;
|
||||
recv_data >> tabId;
|
||||
|
||||
std::string text;
|
||||
recv_data >> text;
|
||||
recvData >> tabId >> text;
|
||||
|
||||
if (Guild* guild = _GetPlayerGuild(this))
|
||||
sLog->outDebug(LOG_FILTER_GUILD, "CMSG_SET_GUILD_BANK_TEXT [%s]: TabId: %u, Text: %s", GetPlayerInfo().c_str(), tabId, text.c_str());
|
||||
|
||||
if (Guild* guild = GetPlayer()->GetGuild())
|
||||
guild->SetBankTabText(tabId, text);
|
||||
}
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
#include "ObjectAccessor.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
void WorldSession::HandleSplitItemOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSplitItemOpcode(WorldPacket & recvData)
|
||||
{
|
||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_SPLIT_ITEM");
|
||||
uint8 srcbag, srcslot, dstbag, dstslot;
|
||||
uint32 count;
|
||||
|
||||
recv_data >> srcbag >> srcslot >> dstbag >> dstslot >> count;
|
||||
recvData >> srcbag >> srcslot >> dstbag >> dstslot >> count;
|
||||
//sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u, dstslot = %u, count = %u", srcbag, srcslot, dstbag, dstslot, count);
|
||||
|
||||
uint16 src = ((srcbag << 8) | srcslot);
|
||||
@@ -61,12 +61,12 @@ void WorldSession::HandleSplitItemOpcode(WorldPacket & recv_data)
|
||||
_player->SplitItem(src, dst, count);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSwapInvItemOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSwapInvItemOpcode(WorldPacket & recvData)
|
||||
{
|
||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_SWAP_INV_ITEM");
|
||||
uint8 srcslot, dstslot;
|
||||
|
||||
recv_data >> dstslot >> srcslot;
|
||||
recvData >> dstslot >> srcslot;
|
||||
//sLog->outDebug("STORAGE: receive srcslot = %u, dstslot = %u", srcslot, dstslot);
|
||||
|
||||
// prevent attempt swap same item to current position generated by client at special checting sequence
|
||||
@@ -91,11 +91,11 @@ void WorldSession::HandleSwapInvItemOpcode(WorldPacket & recv_data)
|
||||
_player->SwapItem(src, dst);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAutoEquipItemSlotOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAutoEquipItemSlotOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 itemguid;
|
||||
uint8 dstslot;
|
||||
recv_data >> itemguid >> dstslot;
|
||||
recvData >> itemguid >> dstslot;
|
||||
|
||||
// cheating attempt, client should never send opcode in that case
|
||||
if (!Player::IsEquipmentPos(INVENTORY_SLOT_BAG_0, dstslot))
|
||||
@@ -110,12 +110,12 @@ void WorldSession::HandleAutoEquipItemSlotOpcode(WorldPacket & recv_data)
|
||||
_player->SwapItem(item->GetPos(), dstpos);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSwapItem(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSwapItem(WorldPacket & recvData)
|
||||
{
|
||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_SWAP_ITEM");
|
||||
uint8 dstbag, dstslot, srcbag, srcslot;
|
||||
|
||||
recv_data >> dstbag >> dstslot >> srcbag >> srcslot;
|
||||
recvData >> dstbag >> dstslot >> srcbag >> srcslot;
|
||||
//sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u, dstslot = %u", srcbag, srcslot, dstbag, dstslot);
|
||||
|
||||
uint16 src = ((srcbag << 8) | srcslot);
|
||||
@@ -140,12 +140,12 @@ void WorldSession::HandleSwapItem(WorldPacket & recv_data)
|
||||
_player->SwapItem(src, dst);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recvData)
|
||||
{
|
||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_AUTOEQUIP_ITEM");
|
||||
uint8 srcbag, srcslot;
|
||||
|
||||
recv_data >> srcbag >> srcslot;
|
||||
recvData >> srcbag >> srcslot;
|
||||
//sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
|
||||
|
||||
Item* pSrcItem = _player->GetItemByPos(srcbag, srcslot);
|
||||
@@ -234,12 +234,12 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleDestroyItemOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleDestroyItemOpcode(WorldPacket & recvData)
|
||||
{
|
||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_DESTROYITEM");
|
||||
uint8 bag, slot, count, data1, data2, data3;
|
||||
|
||||
recv_data >> bag >> slot >> count >> data1 >> data2 >> data3;
|
||||
recvData >> bag >> slot >> count >> data1 >> data2 >> data3;
|
||||
//sLog->outDebug("STORAGE: receive bag = %u, slot = %u, count = %u", bag, slot, count);
|
||||
|
||||
uint16 pos = (bag << 8) | slot;
|
||||
@@ -278,11 +278,11 @@ void WorldSession::HandleDestroyItemOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
// Only _static_ data send in this packet !!!
|
||||
void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recvData)
|
||||
{
|
||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_ITEM_QUERY_SINGLE");
|
||||
uint32 item;
|
||||
recv_data >> item;
|
||||
recvData >> item;
|
||||
|
||||
sLog->outInfo(LOG_FILTER_NETWORKIO, "STORAGE: Item Query = %u", item);
|
||||
|
||||
@@ -437,12 +437,12 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleReadItem(WorldPacket & recv_data)
|
||||
void WorldSession::HandleReadItem(WorldPacket & recvData)
|
||||
{
|
||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_READ_ITEM");
|
||||
|
||||
uint8 bag, slot;
|
||||
recv_data >> bag >> slot;
|
||||
recvData >> bag >> slot;
|
||||
|
||||
//sLog->outInfo(LOG_FILTER_NETWORKIO, "STORAGE: Read bag = %u, slot = %u", bag, slot);
|
||||
Item* pItem = _player->GetItemByPos(bag, slot);
|
||||
@@ -470,26 +470,26 @@ void WorldSession::HandleReadItem(WorldPacket & recv_data)
|
||||
_player->SendEquipError(EQUIP_ERR_ITEM_NOT_FOUND, NULL, NULL);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePageQuerySkippedOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePageQuerySkippedOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PAGE_TEXT_QUERY");
|
||||
|
||||
uint32 itemid;
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> itemid >> guid;
|
||||
recvData >> itemid >> guid;
|
||||
|
||||
sLog->outInfo(LOG_FILTER_NETWORKIO, "Packet Info: itemid: %u guidlow: %u guidentry: %u guidhigh: %u",
|
||||
itemid, GUID_LOPART(guid), GUID_ENPART(guid), GUID_HIPART(guid));
|
||||
}
|
||||
|
||||
void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSellItemOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_SELL_ITEM");
|
||||
uint64 vendorguid, itemguid;
|
||||
uint32 count;
|
||||
|
||||
recv_data >> vendorguid >> itemguid >> count;
|
||||
recvData >> vendorguid >> itemguid >> count;
|
||||
|
||||
if (!itemguid)
|
||||
return;
|
||||
@@ -597,13 +597,13 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
void WorldSession::HandleBuybackItem(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBuybackItem(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUYBACK_ITEM");
|
||||
uint64 vendorguid;
|
||||
uint32 slot;
|
||||
|
||||
recv_data >> vendorguid >> slot;
|
||||
recvData >> vendorguid >> slot;
|
||||
|
||||
Creature* creature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
|
||||
if (!creature)
|
||||
@@ -645,14 +645,14 @@ void WorldSession::HandleBuybackItem(WorldPacket & recv_data)
|
||||
_player->SendBuyError(BUY_ERR_CANT_FIND_ITEM, creature, 0, 0);
|
||||
}
|
||||
|
||||
void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUY_ITEM_IN_SLOT");
|
||||
uint64 vendorguid, bagguid;
|
||||
uint32 item, slot, count;
|
||||
uint8 bagslot;
|
||||
|
||||
recv_data >> vendorguid >> item >> slot >> bagguid >> bagslot >> count;
|
||||
recvData >> vendorguid >> item >> slot >> bagguid >> bagslot >> count;
|
||||
|
||||
// client expects count starting at 1, and we send vendorslot+1 to client already
|
||||
if (slot > 0)
|
||||
@@ -687,14 +687,14 @@ void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket & recv_data)
|
||||
GetPlayer()->BuyItemFromVendorSlot(vendorguid, slot, item, count, bag, bagslot);
|
||||
}
|
||||
|
||||
void WorldSession::HandleBuyItemOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBuyItemOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BUY_ITEM");
|
||||
uint64 vendorguid;
|
||||
uint32 item, slot, count;
|
||||
uint8 unk1;
|
||||
|
||||
recv_data >> vendorguid >> item >> slot >> count >> unk1;
|
||||
recvData >> vendorguid >> item >> slot >> count >> unk1;
|
||||
|
||||
// client expects count starting at 1, and we send vendorslot+1 to client already
|
||||
if (slot > 0)
|
||||
@@ -705,11 +705,11 @@ void WorldSession::HandleBuyItemOpcode(WorldPacket & recv_data)
|
||||
GetPlayer()->BuyItemFromVendorSlot(vendorguid, slot, item, count, NULL_BAG, NULL_SLOT);
|
||||
}
|
||||
|
||||
void WorldSession::HandleListInventoryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleListInventoryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
if (!GetPlayer()->isAlive())
|
||||
return;
|
||||
@@ -807,12 +807,12 @@ void WorldSession::SendListInventory(uint64 vendorGuid)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket & recvData)
|
||||
{
|
||||
//sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_AUTOSTORE_BAG_ITEM");
|
||||
uint8 srcbag, srcslot, dstbag;
|
||||
|
||||
recv_data >> srcbag >> srcslot >> dstbag;
|
||||
recvData >> srcbag >> srcslot >> dstbag;
|
||||
//sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u", srcbag, srcslot, dstbag);
|
||||
|
||||
Item* pItem = _player->GetItemByPos(srcbag, srcslot);
|
||||
@@ -983,7 +983,7 @@ void WorldSession::HandleAutoStoreBankItemOpcode(WorldPacket& recvPacket)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetAmmoOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSetAmmoOpcode(WorldPacket & recvData)
|
||||
{
|
||||
if (!GetPlayer()->isAlive())
|
||||
{
|
||||
@@ -994,7 +994,7 @@ void WorldSession::HandleSetAmmoOpcode(WorldPacket & recv_data)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SET_AMMO");
|
||||
uint32 item;
|
||||
|
||||
recv_data >> item;
|
||||
recvData >> item;
|
||||
|
||||
if (!item)
|
||||
GetPlayer()->RemoveAmmo();
|
||||
@@ -1024,11 +1024,11 @@ void WorldSession::SendItemEnchantTimeUpdate(uint64 Playerguid, uint64 Itemguid,
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint32 itemid;
|
||||
recv_data >> itemid;
|
||||
recv_data.read_skip<uint64>(); // guid
|
||||
recvData >> itemid;
|
||||
recvData.read_skip<uint64>(); // guid
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_NAME_QUERY %u", itemid);
|
||||
ItemSetNameEntry const* pName = sObjectMgr->GetItemSetNameEntry(itemid);
|
||||
@@ -1048,14 +1048,14 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleWrapItemOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_WRAP_ITEM");
|
||||
|
||||
uint8 gift_bag, gift_slot, item_bag, item_slot;
|
||||
|
||||
recv_data >> gift_bag >> gift_slot; // paper
|
||||
recv_data >> item_bag >> item_slot; // item
|
||||
recvData >> gift_bag >> gift_slot; // paper
|
||||
recvData >> item_bag >> item_slot; // item
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WRAP: receive gift_bag = %u, gift_slot = %u, item_bag = %u, item_slot = %u", gift_bag, gift_slot, item_bag, item_slot);
|
||||
|
||||
@@ -1159,19 +1159,19 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
|
||||
_player->DestroyItemCount(gift, count, true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SOCKET_GEMS");
|
||||
|
||||
uint64 item_guid;
|
||||
uint64 gem_guids[MAX_GEM_SOCKETS];
|
||||
|
||||
recv_data >> item_guid;
|
||||
recvData >> item_guid;
|
||||
if (!item_guid)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < MAX_GEM_SOCKETS; ++i)
|
||||
recv_data >> gem_guids[i];
|
||||
recvData >> gem_guids[i];
|
||||
|
||||
//cheat -> tried to socket same gem multiple times
|
||||
if ((gem_guids[0] && (gem_guids[0] == gem_guids[1] || gem_guids[0] == gem_guids[2])) ||
|
||||
@@ -1353,13 +1353,13 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
|
||||
itemTarget->ClearSoulboundTradeable(_player); // clear tradeable flag
|
||||
}
|
||||
|
||||
void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");
|
||||
|
||||
uint32 eslot;
|
||||
|
||||
recv_data >> eslot;
|
||||
recvData >> eslot;
|
||||
|
||||
// apply only to equipped item
|
||||
if (!Player::IsEquipmentPos(INVENTORY_SLOT_BAG_0, eslot))
|
||||
@@ -1377,12 +1377,12 @@ void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data)
|
||||
item->ClearEnchantment(TEMP_ENCHANTMENT_SLOT);
|
||||
}
|
||||
|
||||
void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data)
|
||||
void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_REFUND_INFO");
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid; // item guid
|
||||
recvData >> guid; // item guid
|
||||
|
||||
Item* item = _player->GetItemByGuid(guid);
|
||||
if (!item)
|
||||
@@ -1394,11 +1394,11 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data)
|
||||
GetPlayer()->SendRefundInfo(item);
|
||||
}
|
||||
|
||||
void WorldSession::HandleItemRefund(WorldPacket &recv_data)
|
||||
void WorldSession::HandleItemRefund(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ITEM_REFUND");
|
||||
uint64 guid;
|
||||
recv_data >> guid; // item guid
|
||||
recvData >> guid; // item guid
|
||||
|
||||
Item* item = _player->GetItemByGuid(guid);
|
||||
if (!item)
|
||||
@@ -1415,10 +1415,10 @@ void WorldSession::HandleItemRefund(WorldPacket &recv_data)
|
||||
*
|
||||
* This function is called when player clicks on item which has some flag set
|
||||
*/
|
||||
void WorldSession::HandleItemTextQuery(WorldPacket & recv_data )
|
||||
void WorldSession::HandleItemTextQuery(WorldPacket & recvData )
|
||||
{
|
||||
uint64 itemGuid;
|
||||
recv_data >> itemGuid;
|
||||
recvData >> itemGuid;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid));
|
||||
|
||||
|
||||
@@ -44,13 +44,13 @@ void BuildPartyLockDungeonBlock(WorldPacket& data, const LfgLockPartyMap& lockMa
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
|
||||
{
|
||||
if (!sLFGMgr->isOptionEnabled(LFG_OPTION_ENABLE_DUNGEON_FINDER | LFG_OPTION_ENABLE_RAID_BROWSER) ||
|
||||
(GetPlayer()->GetGroup() && GetPlayer()->GetGroup()->GetLeaderGUID() != GetPlayer()->GetGUID() &&
|
||||
(GetPlayer()->GetGroup()->GetMembersCount() == MAXGROUPSIZE || !GetPlayer()->GetGroup()->isLFGGroup())))
|
||||
{
|
||||
recv_data.rfinish();
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -58,32 +58,32 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data)
|
||||
uint32 dungeon;
|
||||
uint32 roles;
|
||||
|
||||
recv_data >> roles;
|
||||
recv_data.read_skip<uint16>(); // uint8 (always 0) - uint8 (always 0)
|
||||
recv_data >> numDungeons;
|
||||
recvData >> roles;
|
||||
recvData.read_skip<uint16>(); // uint8 (always 0) - uint8 (always 0)
|
||||
recvData >> numDungeons;
|
||||
if (!numDungeons)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_JOIN [" UI64FMTD "] no dungeons selected", GetPlayer()->GetGUID());
|
||||
recv_data.rfinish();
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
|
||||
LfgDungeonSet newDungeons;
|
||||
for (int8 i = 0; i < numDungeons; ++i)
|
||||
{
|
||||
recv_data >> dungeon;
|
||||
recvData >> dungeon;
|
||||
newDungeons.insert((dungeon & 0x00FFFFFF)); // remove the type from the dungeon entry
|
||||
}
|
||||
|
||||
recv_data.read_skip<uint32>(); // for 0..uint8 (always 3) { uint8 (always 0) }
|
||||
recvData.read_skip<uint32>(); // for 0..uint8 (always 3) { uint8 (always 0) }
|
||||
|
||||
std::string comment;
|
||||
recv_data >> comment;
|
||||
recvData >> comment;
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_JOIN [" UI64FMTD "] roles: %u, Dungeons: %u, Comment: %s", GetPlayer()->GetGUID(), roles, uint8(newDungeons.size()), comment.c_str());
|
||||
sLFGMgr->JoinLfg(GetPlayer(), uint8(roles), newDungeons, comment);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recv_data*/)
|
||||
void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
Group* grp = GetPlayer()->GetGroup();
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
@@ -96,21 +96,21 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recv_data*/)
|
||||
sLFGMgr->LeaveLfg(gguid);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint32 lfgGroupID; // Internal lfgGroupID
|
||||
bool accept; // Accept to join?
|
||||
recv_data >> lfgGroupID;
|
||||
recv_data >> accept;
|
||||
recvData >> lfgGroupID;
|
||||
recvData >> accept;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PROPOSAL_RESULT [" UI64FMTD "] proposal: %u accept: %u", GetPlayer()->GetGUID(), lfgGroupID, accept ? 1 : 0);
|
||||
sLFGMgr->UpdateProposal(lfgGroupID, GetPlayer()->GetGUID(), accept);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint8 roles;
|
||||
recv_data >> roles; // Player Group Roles
|
||||
recvData >> roles; // Player Group Roles
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
Group* grp = GetPlayer()->GetGroup();
|
||||
if (!grp)
|
||||
@@ -123,36 +123,36 @@ void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recv_data)
|
||||
sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recvData)
|
||||
{
|
||||
std::string comment;
|
||||
recv_data >> comment;
|
||||
recvData >> comment;
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_COMMENT [" UI64FMTD "] comment: %s", guid, comment.c_str());
|
||||
|
||||
sLFGMgr->SetComment(guid, comment);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recvData)
|
||||
{
|
||||
bool agree; // Agree to kick player
|
||||
recv_data >> agree;
|
||||
recvData >> agree;
|
||||
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_BOOT_VOTE [" UI64FMTD "] agree: %u", guid, agree ? 1 : 0);
|
||||
sLFGMgr->UpdateBoot(guid, agree);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData)
|
||||
{
|
||||
bool out;
|
||||
recv_data >> out;
|
||||
recvData >> out;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_TELEPORT [" UI64FMTD "] out: %u", GetPlayer()->GetGUID(), out ? 1 : 0);
|
||||
sLFGMgr->TeleportPlayer(GetPlayer(), out, true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data*/)
|
||||
void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
|
||||
@@ -231,7 +231,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recv_data*/)
|
||||
void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PARTY_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
|
||||
@@ -265,18 +265,18 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recv_data
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfrJoinOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleLfrJoinOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint32 entry; // Raid id to search
|
||||
recv_data >> entry;
|
||||
recvData >> entry;
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LFR_JOIN [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), entry);
|
||||
//SendLfrUpdateListOpcode(entry);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfrLeaveOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleLfrLeaveOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint32 dungeonId; // Raid id queue to leave
|
||||
recv_data >> dungeonId;
|
||||
recvData >> dungeonId;
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LFR_LEAVE [" UI64FMTD "] dungeonId: %u", GetPlayer()->GetGUID(), dungeonId);
|
||||
//sLFGMgr->LeaveLfr(GetPlayer(), dungeonId);
|
||||
}
|
||||
@@ -617,7 +617,7 @@ void WorldSession::SendLfgTeleportError(uint8 err)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLfgGetStatus(WorldPacket& /*recv_data*/)
|
||||
void WorldSession::HandleLfgGetStatus(WorldPacket& /*recvData*/)
|
||||
{
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_GET_STATUS [" UI64FMTD "]", guid);
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "World.h"
|
||||
#include "Util.h"
|
||||
|
||||
void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
|
||||
Player* player = GetPlayer();
|
||||
@@ -38,7 +38,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data)
|
||||
Loot* loot = NULL;
|
||||
uint8 lootSlot = 0;
|
||||
|
||||
recv_data >> lootSlot;
|
||||
recvData >> lootSlot;
|
||||
|
||||
if (IS_GAMEOBJECT_GUID(lguid))
|
||||
{
|
||||
@@ -94,7 +94,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data)
|
||||
player->StoreLootItem(lootSlot, loot);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT_MONEY");
|
||||
|
||||
@@ -202,12 +202,12 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleLootOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleLootOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_LOOT");
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
// Check possible cheat
|
||||
if (!_player->isAlive())
|
||||
@@ -428,12 +428,12 @@ void WorldSession::DoLootRelease(uint64 lguid)
|
||||
loot->RemoveLooter(player->GetGUID());
|
||||
}
|
||||
|
||||
void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint8 slotid;
|
||||
uint64 lootguid, target_playerguid;
|
||||
|
||||
recv_data >> lootguid >> slotid >> target_playerguid;
|
||||
recvData >> lootguid >> slotid >> target_playerguid;
|
||||
|
||||
if (!_player->GetGroup() || _player->GetGroup()->GetLooterGuid() != _player->GetGUID())
|
||||
{
|
||||
|
||||
@@ -29,29 +29,29 @@
|
||||
#include "Item.h"
|
||||
#include "AccountMgr.h"
|
||||
|
||||
void WorldSession::HandleSendMail(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSendMail(WorldPacket & recvData)
|
||||
{
|
||||
uint64 mailbox, unk3;
|
||||
std::string receiver, subject, body;
|
||||
uint32 unk1, unk2, money, COD;
|
||||
uint8 unk4;
|
||||
recv_data >> mailbox;
|
||||
recv_data >> receiver;
|
||||
recvData >> mailbox;
|
||||
recvData >> receiver;
|
||||
|
||||
recv_data >> subject;
|
||||
recvData >> subject;
|
||||
|
||||
recv_data >> body;
|
||||
recvData >> body;
|
||||
|
||||
recv_data >> unk1; // stationery?
|
||||
recv_data >> unk2; // 0x00000000
|
||||
recvData >> unk1; // stationery?
|
||||
recvData >> unk2; // 0x00000000
|
||||
|
||||
uint8 items_count;
|
||||
recv_data >> items_count; // attached items count
|
||||
recvData >> items_count; // attached items count
|
||||
|
||||
if (items_count > MAX_MAIL_ITEMS) // client limit
|
||||
{
|
||||
GetPlayer()->SendMailResult(0, MAIL_SEND, MAIL_ERR_TOO_MANY_ATTACHMENTS);
|
||||
recv_data.rfinish(); // set to end to avoid warnings spam
|
||||
recvData.rfinish(); // set to end to avoid warnings spam
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -59,13 +59,13 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
|
||||
|
||||
for (uint8 i = 0; i < items_count; ++i)
|
||||
{
|
||||
recv_data.read_skip<uint8>(); // item slot in mail, not used
|
||||
recv_data >> itemGUIDs[i];
|
||||
recvData.read_skip<uint8>(); // item slot in mail, not used
|
||||
recvData >> itemGUIDs[i];
|
||||
}
|
||||
|
||||
recv_data >> money >> COD; // money and cod
|
||||
recv_data >> unk3; // const 0
|
||||
recv_data >> unk4; // const 0
|
||||
recvData >> money >> COD; // money and cod
|
||||
recvData >> unk3; // const 0
|
||||
recvData >> unk4; // const 0
|
||||
|
||||
// packet read complete, now do check
|
||||
|
||||
@@ -302,12 +302,12 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//called when mail is read
|
||||
void WorldSession::HandleMailMarkAsRead(WorldPacket & recv_data)
|
||||
void WorldSession::HandleMailMarkAsRead(WorldPacket & recvData)
|
||||
{
|
||||
uint64 mailbox;
|
||||
uint32 mailId;
|
||||
recv_data >> mailbox;
|
||||
recv_data >> mailId;
|
||||
recvData >> mailbox;
|
||||
recvData >> mailId;
|
||||
|
||||
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
|
||||
return;
|
||||
@@ -325,13 +325,13 @@ void WorldSession::HandleMailMarkAsRead(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//called when client deletes mail
|
||||
void WorldSession::HandleMailDelete(WorldPacket & recv_data)
|
||||
void WorldSession::HandleMailDelete(WorldPacket & recvData)
|
||||
{
|
||||
uint64 mailbox;
|
||||
uint32 mailId;
|
||||
recv_data >> mailbox;
|
||||
recv_data >> mailId;
|
||||
recv_data.read_skip<uint32>(); // mailTemplateId
|
||||
recvData >> mailbox;
|
||||
recvData >> mailId;
|
||||
recvData.read_skip<uint32>(); // mailTemplateId
|
||||
|
||||
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
|
||||
return;
|
||||
@@ -353,13 +353,13 @@ void WorldSession::HandleMailDelete(WorldPacket & recv_data)
|
||||
player->SendMailResult(mailId, MAIL_DELETED, MAIL_OK);
|
||||
}
|
||||
|
||||
void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
|
||||
void WorldSession::HandleMailReturnToSender(WorldPacket & recvData)
|
||||
{
|
||||
uint64 mailbox;
|
||||
uint32 mailId;
|
||||
recv_data >> mailbox;
|
||||
recv_data >> mailId;
|
||||
recv_data.read_skip<uint64>(); // original sender GUID for return to, not used
|
||||
recvData >> mailbox;
|
||||
recvData >> mailId;
|
||||
recvData.read_skip<uint64>(); // original sender GUID for return to, not used
|
||||
|
||||
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
|
||||
return;
|
||||
@@ -417,14 +417,14 @@ void WorldSession::HandleMailReturnToSender(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//called when player takes item attached in mail
|
||||
void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
|
||||
void WorldSession::HandleMailTakeItem(WorldPacket & recvData)
|
||||
{
|
||||
uint64 mailbox;
|
||||
uint32 mailId;
|
||||
uint32 itemId;
|
||||
recv_data >> mailbox;
|
||||
recv_data >> mailId;
|
||||
recv_data >> itemId; // item guid low
|
||||
recvData >> mailbox;
|
||||
recvData >> mailId;
|
||||
recvData >> itemId; // item guid low
|
||||
|
||||
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
|
||||
return;
|
||||
@@ -513,12 +513,12 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
|
||||
player->SendMailResult(mailId, MAIL_ITEM_TAKEN, MAIL_ERR_EQUIP_ERROR, msg);
|
||||
}
|
||||
|
||||
void WorldSession::HandleMailTakeMoney(WorldPacket & recv_data)
|
||||
void WorldSession::HandleMailTakeMoney(WorldPacket & recvData)
|
||||
{
|
||||
uint64 mailbox;
|
||||
uint32 mailId;
|
||||
recv_data >> mailbox;
|
||||
recv_data >> mailId;
|
||||
recvData >> mailbox;
|
||||
recvData >> mailId;
|
||||
|
||||
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
|
||||
return;
|
||||
@@ -547,10 +547,10 @@ void WorldSession::HandleMailTakeMoney(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//called when player lists his received mails
|
||||
void WorldSession::HandleGetMailList(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGetMailList(WorldPacket & recvData)
|
||||
{
|
||||
uint64 mailbox;
|
||||
recv_data >> mailbox;
|
||||
recvData >> mailbox;
|
||||
|
||||
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
|
||||
return;
|
||||
@@ -669,13 +669,13 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//used when player copies mail body to his inventory
|
||||
void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
|
||||
void WorldSession::HandleMailCreateTextItem(WorldPacket & recvData)
|
||||
{
|
||||
uint64 mailbox;
|
||||
uint32 mailId;
|
||||
|
||||
recv_data >> mailbox;
|
||||
recv_data >> mailId;
|
||||
recvData >> mailbox;
|
||||
recvData >> mailId;
|
||||
|
||||
if (!GetPlayer()->GetGameObjectIfCanInteractWith(mailbox, GAMEOBJECT_TYPE_MAILBOX))
|
||||
return;
|
||||
@@ -735,7 +735,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
//TODO Fix me! ... this void has probably bad condition, but good data are sent
|
||||
void WorldSession::HandleQueryNextMailTime(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleQueryNextMailTime(WorldPacket & /*recvData*/)
|
||||
{
|
||||
WorldPacket data(MSG_QUERY_NEXT_MAIL_TIME, 8);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "InstanceSaveMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
void WorldSession::HandleMoveWorldportAckOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleMoveWorldportAckOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: got MSG_MOVE_WORLDPORT_ACK.");
|
||||
HandleMoveWorldportAckOpcode();
|
||||
@@ -188,15 +188,15 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
GetPlayer()->ProcessDelayedOperations();
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
|
||||
void WorldSession::HandleMoveTeleportAck(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_MOVE_TELEPORT_ACK");
|
||||
uint64 guid;
|
||||
|
||||
recv_data.readPackGUID(guid);
|
||||
recvData.readPackGUID(guid);
|
||||
|
||||
uint32 flags, time;
|
||||
recv_data >> flags >> time;
|
||||
recvData >> flags >> time;
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Guid " UI64FMTD, guid);
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Flags %u, time %u", flags, time/IN_MILLISECONDS);
|
||||
|
||||
@@ -407,9 +407,9 @@ void WorldSession::HandleMovementOpcodes(WorldPacket & recvData)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
|
||||
void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recvData)
|
||||
{
|
||||
uint32 opcode = recv_data.GetOpcode();
|
||||
uint32 opcode = recvData.GetOpcode();
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode);
|
||||
|
||||
/* extract packet */
|
||||
@@ -417,24 +417,24 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
|
||||
uint32 unk1;
|
||||
float newspeed;
|
||||
|
||||
recv_data.readPackGUID(guid);
|
||||
recvData.readPackGUID(guid);
|
||||
|
||||
// now can skip not our packet
|
||||
if (_player->GetGUID() != guid)
|
||||
{
|
||||
recv_data.rfinish(); // prevent warnings spam
|
||||
recvData.rfinish(); // prevent warnings spam
|
||||
return;
|
||||
}
|
||||
|
||||
// continue parse packet
|
||||
|
||||
recv_data >> unk1; // counter or moveEvent
|
||||
recvData >> unk1; // counter or moveEvent
|
||||
|
||||
MovementInfo movementInfo;
|
||||
movementInfo.guid = guid;
|
||||
ReadMovementInfo(recv_data, &movementInfo);
|
||||
ReadMovementInfo(recvData, &movementInfo);
|
||||
|
||||
recv_data >> newspeed;
|
||||
recvData >> newspeed;
|
||||
/*----------------*/
|
||||
|
||||
// client ACK send one packet for mounted/run case and need skip all except last from its
|
||||
@@ -486,12 +486,12 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
|
||||
void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_SET_ACTIVE_MOVER");
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
if (GetPlayer()->IsInWorld())
|
||||
{
|
||||
@@ -500,22 +500,22 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data)
|
||||
void WorldSession::HandleMoveNotActiveMover(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_MOVE_NOT_ACTIVE_MOVER");
|
||||
|
||||
uint64 old_mover_guid;
|
||||
recv_data.readPackGUID(old_mover_guid);
|
||||
recvData.readPackGUID(old_mover_guid);
|
||||
|
||||
MovementInfo mi;
|
||||
ReadMovementInfo(recv_data, &mi);
|
||||
ReadMovementInfo(recvData, &mi);
|
||||
|
||||
mi.guid = old_mover_guid;
|
||||
|
||||
_player->m_movementInfo = mi;
|
||||
}
|
||||
|
||||
void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recv_data*/)
|
||||
void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
WorldPacket data(SMSG_MOUNTSPECIAL_ANIM, 8);
|
||||
data << uint64(GetPlayer()->GetGUID());
|
||||
@@ -523,20 +523,20 @@ void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recv_data*/)
|
||||
GetPlayer()->SendMessageToSet(&data, false);
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveKnockBackAck(WorldPacket & recv_data)
|
||||
void WorldSession::HandleMoveKnockBackAck(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_MOVE_KNOCK_BACK_ACK");
|
||||
|
||||
uint64 guid;
|
||||
recv_data.readPackGUID(guid);
|
||||
recvData.readPackGUID(guid);
|
||||
|
||||
if (_player->m_mover->GetGUID() != guid)
|
||||
return;
|
||||
|
||||
recv_data.read_skip<uint32>(); // unk
|
||||
recvData.read_skip<uint32>(); // unk
|
||||
|
||||
MovementInfo movementInfo;
|
||||
ReadMovementInfo(recv_data, &movementInfo);
|
||||
ReadMovementInfo(recvData, &movementInfo);
|
||||
|
||||
_player->m_movementInfo = movementInfo;
|
||||
|
||||
@@ -553,45 +553,45 @@ void WorldSession::HandleMoveKnockBackAck(WorldPacket & recv_data)
|
||||
_player->SendMessageToSet(&data, false);
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveHoverAck(WorldPacket& recv_data)
|
||||
void WorldSession::HandleMoveHoverAck(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_MOVE_HOVER_ACK");
|
||||
|
||||
uint64 guid; // guid - unused
|
||||
recv_data.readPackGUID(guid);
|
||||
recvData.readPackGUID(guid);
|
||||
|
||||
recv_data.read_skip<uint32>(); // unk
|
||||
recvData.read_skip<uint32>(); // unk
|
||||
|
||||
MovementInfo movementInfo;
|
||||
ReadMovementInfo(recv_data, &movementInfo);
|
||||
ReadMovementInfo(recvData, &movementInfo);
|
||||
|
||||
recv_data.read_skip<uint32>(); // unk2
|
||||
recvData.read_skip<uint32>(); // unk2
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveWaterWalkAck(WorldPacket& recv_data)
|
||||
void WorldSession::HandleMoveWaterWalkAck(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_MOVE_WATER_WALK_ACK");
|
||||
|
||||
uint64 guid; // guid - unused
|
||||
recv_data.readPackGUID(guid);
|
||||
recvData.readPackGUID(guid);
|
||||
|
||||
recv_data.read_skip<uint32>(); // unk
|
||||
recvData.read_skip<uint32>(); // unk
|
||||
|
||||
MovementInfo movementInfo;
|
||||
ReadMovementInfo(recv_data, &movementInfo);
|
||||
ReadMovementInfo(recvData, &movementInfo);
|
||||
|
||||
recv_data.read_skip<uint32>(); // unk2
|
||||
recvData.read_skip<uint32>(); // unk2
|
||||
}
|
||||
|
||||
void WorldSession::HandleSummonResponseOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleSummonResponseOpcode(WorldPacket& recvData)
|
||||
{
|
||||
if (!_player->isAlive() || _player->isInCombat())
|
||||
return;
|
||||
|
||||
uint64 summoner_guid;
|
||||
bool agree;
|
||||
recv_data >> summoner_guid;
|
||||
recv_data >> agree;
|
||||
recvData >> summoner_guid;
|
||||
recvData >> agree;
|
||||
|
||||
_player->SummonIfPossible(agree);
|
||||
}
|
||||
|
||||
@@ -47,10 +47,10 @@ enum StableResultCode
|
||||
STABLE_ERR_EXOTIC = 0x0C // "you are unable to control exotic creatures"
|
||||
};
|
||||
|
||||
void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleTabardVendorActivateOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TABARDDESIGNER);
|
||||
if (!unit)
|
||||
@@ -73,13 +73,13 @@ void WorldSession::SendTabardVendorActivate(uint64 guid)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleBankerActivateOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBankerActivateOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_BANKER_ACTIVATE");
|
||||
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER);
|
||||
if (!unit)
|
||||
@@ -102,11 +102,11 @@ void WorldSession::SendShowBank(uint64 guid)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTrainerListOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleTrainerListOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
SendTrainerList(guid);
|
||||
}
|
||||
|
||||
@@ -234,12 +234,12 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
uint32 spellId = 0;
|
||||
|
||||
recv_data >> guid >> spellId;
|
||||
recvData >> guid >> spellId;
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TRAINER_BUY_SPELL NpcGUID=%u, learn spell id is: %u", uint32(GUID_LOPART(guid)), spellId);
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
|
||||
@@ -294,12 +294,12 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGossipHelloOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GOSSIP_HELLO");
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
|
||||
if (!unit)
|
||||
@@ -343,7 +343,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
|
||||
unit->AI()->sGossipHello(_player);
|
||||
}
|
||||
|
||||
/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
|
||||
/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_PACKETIO, "WORLD: CMSG_GOSSIP_SELECT_OPTION");
|
||||
|
||||
@@ -352,12 +352,12 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
|
||||
uint64 guid;
|
||||
std::string code = "";
|
||||
|
||||
recv_data >> guid >> unk >> option;
|
||||
recvData >> guid >> unk >> option;
|
||||
|
||||
if (_player->PlayerTalkClass->GossipOptionCoded(option))
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_PACKETIO, "reading string");
|
||||
recv_data >> code;
|
||||
recvData >> code;
|
||||
sLog->outDebug(LOG_FILTER_PACKETIO, "string read: %s", code.c_str());
|
||||
}
|
||||
|
||||
@@ -384,13 +384,13 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}*/
|
||||
|
||||
void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
|
||||
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_SPIRITHEALER);
|
||||
if (!unit)
|
||||
@@ -439,10 +439,10 @@ void WorldSession::SendSpiritResurrect()
|
||||
_player->UpdateObjectVisibility();
|
||||
}
|
||||
|
||||
void WorldSession::HandleBinderActivateOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBinderActivateOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 npcGUID;
|
||||
recv_data >> npcGUID;
|
||||
recvData >> npcGUID;
|
||||
|
||||
if (!GetPlayer()->IsInWorld() || !GetPlayer()->isAlive())
|
||||
return;
|
||||
@@ -496,12 +496,12 @@ void WorldSession::SendBindPoint(Creature* npc)
|
||||
_player->PlayerTalkClass->SendCloseGossip();
|
||||
}
|
||||
|
||||
void WorldSession::HandleListStabledPetsOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleListStabledPetsOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv MSG_LIST_STABLED_PETS");
|
||||
uint64 npcGUID;
|
||||
|
||||
recv_data >> npcGUID;
|
||||
recvData >> npcGUID;
|
||||
|
||||
if (!CheckStableMaster(npcGUID))
|
||||
return;
|
||||
@@ -589,12 +589,12 @@ void WorldSession::SendStableResult(uint8 res)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleStablePet(WorldPacket & recv_data)
|
||||
void WorldSession::HandleStablePet(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_STABLE_PET");
|
||||
uint64 npcGUID;
|
||||
|
||||
recv_data >> npcGUID;
|
||||
recvData >> npcGUID;
|
||||
|
||||
if (!GetPlayer()->isAlive())
|
||||
{
|
||||
@@ -664,13 +664,13 @@ void WorldSession::HandleStablePetCallback(PreparedQueryResult result)
|
||||
SendStableResult(STABLE_ERR_STABLE);
|
||||
}
|
||||
|
||||
void WorldSession::HandleUnstablePet(WorldPacket & recv_data)
|
||||
void WorldSession::HandleUnstablePet(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_UNSTABLE_PET.");
|
||||
uint64 npcGUID;
|
||||
uint32 petnumber;
|
||||
|
||||
recv_data >> npcGUID >> petnumber;
|
||||
recvData >> npcGUID >> petnumber;
|
||||
|
||||
if (!CheckStableMaster(npcGUID))
|
||||
{
|
||||
@@ -745,12 +745,12 @@ void WorldSession::HandleUnstablePetCallback(PreparedQueryResult result, uint32
|
||||
SendStableResult(STABLE_SUCCESS_UNSTABLE);
|
||||
}
|
||||
|
||||
void WorldSession::HandleBuyStableSlot(WorldPacket & recv_data)
|
||||
void WorldSession::HandleBuyStableSlot(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_BUY_STABLE_SLOT.");
|
||||
uint64 npcGUID;
|
||||
|
||||
recv_data >> npcGUID;
|
||||
recvData >> npcGUID;
|
||||
|
||||
if (!CheckStableMaster(npcGUID))
|
||||
{
|
||||
@@ -778,18 +778,18 @@ void WorldSession::HandleBuyStableSlot(WorldPacket & recv_data)
|
||||
SendStableResult(STABLE_ERR_STABLE);
|
||||
}
|
||||
|
||||
void WorldSession::HandleStableRevivePet(WorldPacket &/* recv_data */)
|
||||
void WorldSession::HandleStableRevivePet(WorldPacket &/* recvData */)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "HandleStableRevivePet: Not implemented");
|
||||
}
|
||||
|
||||
void WorldSession::HandleStableSwapPet(WorldPacket & recv_data)
|
||||
void WorldSession::HandleStableSwapPet(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_STABLE_SWAP_PET.");
|
||||
uint64 npcGUID;
|
||||
uint32 petId;
|
||||
|
||||
recv_data >> npcGUID >> petId;
|
||||
recvData >> npcGUID >> petId;
|
||||
|
||||
if (!CheckStableMaster(npcGUID))
|
||||
{
|
||||
@@ -875,14 +875,14 @@ void WorldSession::HandleStableSwapPetCallback(PreparedQueryResult result, uint3
|
||||
SendStableResult(STABLE_SUCCESS_UNSTABLE);
|
||||
}
|
||||
|
||||
void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleRepairItemOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_REPAIR_ITEM");
|
||||
|
||||
uint64 npcGUID, itemGUID;
|
||||
uint8 guildBank; // new in 2.3.2, bool that means from guild bank money
|
||||
|
||||
recv_data >> npcGUID >> itemGUID >> guildBank;
|
||||
recvData >> npcGUID >> itemGUID >> guildBank;
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_REPAIR);
|
||||
if (!unit)
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
#include "Group.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
void WorldSession::HandleDismissCritter(WorldPacket &recv_data)
|
||||
void WorldSession::HandleDismissCritter(WorldPacket &recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_DISMISS_CRITTER for GUID " UI64FMTD, guid);
|
||||
|
||||
@@ -55,14 +55,14 @@ void WorldSession::HandleDismissCritter(WorldPacket &recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetAction(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetAction(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid1;
|
||||
uint32 data;
|
||||
uint64 guid2;
|
||||
recv_data >> guid1; //pet guid
|
||||
recv_data >> data;
|
||||
recv_data >> guid2; //tag guid
|
||||
recvData >> guid1; //pet guid
|
||||
recvData >> data;
|
||||
recvData >> guid2; //tag guid
|
||||
|
||||
uint32 spellid = UNIT_ACTION_BUTTON_ACTION(data);
|
||||
uint8 flag = UNIT_ACTION_BUTTON_TYPE(data); //delete = 0x07 CastSpell = C1
|
||||
@@ -110,10 +110,10 @@ void WorldSession::HandlePetAction(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetStopAttack(WorldPacket &recv_data)
|
||||
void WorldSession::HandlePetStopAttack(WorldPacket &recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PET_STOP_ATTACK for GUID " UI64FMTD "", guid);
|
||||
|
||||
@@ -402,15 +402,15 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetNameQuery(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetNameQuery(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetNameQuery. CMSG_PET_NAME_QUERY");
|
||||
|
||||
uint32 petnumber;
|
||||
uint64 petguid;
|
||||
|
||||
recv_data >> petnumber;
|
||||
recv_data >> petguid;
|
||||
recvData >> petnumber;
|
||||
recvData >> petguid;
|
||||
|
||||
SendPetNameQuery(petguid, petnumber);
|
||||
}
|
||||
@@ -469,14 +469,14 @@ bool WorldSession::CheckStableMaster(uint64 guid)
|
||||
return true;
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetSetAction(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetSetAction(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetSetAction. CMSG_PET_SET_ACTION");
|
||||
|
||||
uint64 petguid;
|
||||
uint8 count;
|
||||
|
||||
recv_data >> petguid;
|
||||
recvData >> petguid;
|
||||
|
||||
Unit* pet = ObjectAccessor::GetUnit(*_player, petguid);
|
||||
|
||||
@@ -493,7 +493,7 @@ void WorldSession::HandlePetSetAction(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
|
||||
count = (recv_data.size() == 24) ? 2 : 1;
|
||||
count = (recvData.size() == 24) ? 2 : 1;
|
||||
|
||||
uint32 position[2];
|
||||
uint32 data[2];
|
||||
@@ -501,8 +501,8 @@ void WorldSession::HandlePetSetAction(WorldPacket & recv_data)
|
||||
|
||||
for (uint8 i = 0; i < count; ++i)
|
||||
{
|
||||
recv_data >> position[i];
|
||||
recv_data >> data[i];
|
||||
recvData >> position[i];
|
||||
recvData >> data[i];
|
||||
|
||||
uint8 act_state = UNIT_ACTION_BUTTON_TYPE(data[i]);
|
||||
|
||||
@@ -586,7 +586,7 @@ void WorldSession::HandlePetSetAction(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetRename(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetRename(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetRename. CMSG_PET_RENAME");
|
||||
|
||||
@@ -596,9 +596,9 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data)
|
||||
std::string name;
|
||||
DeclinedName declinedname;
|
||||
|
||||
recv_data >> petguid;
|
||||
recv_data >> name;
|
||||
recv_data >> isdeclined;
|
||||
recvData >> petguid;
|
||||
recvData >> name;
|
||||
recvData >> isdeclined;
|
||||
|
||||
Pet* pet = ObjectAccessor::FindPet(petguid);
|
||||
// check it!
|
||||
@@ -632,7 +632,7 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
|
||||
{
|
||||
recv_data >> declinedname.name[i];
|
||||
recvData >> declinedname.name[i];
|
||||
}
|
||||
|
||||
std::wstring wname;
|
||||
@@ -671,10 +671,10 @@ void WorldSession::HandlePetRename(WorldPacket & recv_data)
|
||||
pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); // cast can't be helped
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetAbandon(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetAbandon(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid; //pet guid
|
||||
recvData >> guid; //pet guid
|
||||
sLog->outInfo(LOG_FILTER_NETWORKIO, "HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid));
|
||||
|
||||
if (!_player->IsInWorld())
|
||||
@@ -855,33 +855,33 @@ void WorldSession::SendPetNameInvalid(uint32 error, const std::string& name, Dec
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetLearnTalent(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetLearnTalent(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_PET_LEARN_TALENT");
|
||||
|
||||
uint64 guid;
|
||||
uint32 talent_id, requested_rank;
|
||||
recv_data >> guid >> talent_id >> requested_rank;
|
||||
recvData >> guid >> talent_id >> requested_rank;
|
||||
|
||||
_player->LearnPetTalent(guid, talent_id, requested_rank);
|
||||
_player->SendTalentsInfoData(true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket & recv_data)
|
||||
void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_LEARN_PREVIEW_TALENTS_PET");
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
uint32 talentsCount;
|
||||
recv_data >> talentsCount;
|
||||
recvData >> talentsCount;
|
||||
|
||||
uint32 talentId, talentRank;
|
||||
|
||||
for (uint32 i = 0; i < talentsCount; ++i)
|
||||
{
|
||||
recv_data >> talentId >> talentRank;
|
||||
recvData >> talentId >> talentRank;
|
||||
|
||||
_player->LearnPetTalent(guid, talentId, talentRank);
|
||||
}
|
||||
|
||||
@@ -33,12 +33,6 @@
|
||||
|
||||
#define CHARTER_DISPLAY_ID 16161
|
||||
|
||||
/*enum PetitionType // dbc data
|
||||
{
|
||||
PETITION_TYPE_GUILD = 1,
|
||||
PETITION_TYPE_ARENA_TEAM = 3
|
||||
};*/
|
||||
|
||||
// Charters ID in item_template
|
||||
enum CharterItemIDs
|
||||
{
|
||||
@@ -56,7 +50,7 @@ enum CharterCosts
|
||||
ARENA_TEAM_CHARTER_5v5_COST = 2000000
|
||||
};
|
||||
|
||||
void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_BUY");
|
||||
|
||||
@@ -64,28 +58,28 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
|
||||
uint32 clientIndex; // 1 for guild and arenaslot+1 for arenas in client
|
||||
std::string name;
|
||||
|
||||
recv_data >> guidNPC; // NPC GUID
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint64>(); // 0
|
||||
recv_data >> name; // name
|
||||
recv_data.read_skip<std::string>(); // some string
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint16>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recvData >> guidNPC; // NPC GUID
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
recvData.read_skip<uint64>(); // 0
|
||||
recvData >> name; // name
|
||||
recvData.read_skip<std::string>(); // some string
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
recvData.read_skip<uint16>(); // 0
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
|
||||
for (int i = 0; i < 10; ++i)
|
||||
recv_data.read_skip<std::string>();
|
||||
recvData.read_skip<std::string>();
|
||||
|
||||
recv_data >> clientIndex; // index
|
||||
recv_data.read_skip<uint32>(); // 0
|
||||
recvData >> clientIndex; // index
|
||||
recvData.read_skip<uint32>(); // 0
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str());
|
||||
|
||||
@@ -157,12 +151,13 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
if (sGuildMgr->GetGuildByName(name))
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NAME_EXISTS_S, name);
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NAME_EXISTS_S, name);
|
||||
return;
|
||||
}
|
||||
|
||||
if (sObjectMgr->IsReservedName(name) || !ObjectMgr::IsValidCharterName(name))
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NAME_INVALID, name);
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NAME_INVALID, name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -250,13 +245,13 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SHOW_SIGNATURES");
|
||||
|
||||
uint8 signs = 0;
|
||||
uint64 petitionguid;
|
||||
recv_data >> petitionguid; // petition guid
|
||||
recvData >> petitionguid; // petition guid
|
||||
|
||||
// solve (possible) some strange compile problems with explicit use GUID_LOPART(petitionguid) at some GCC versions (wrong code optimization in compiler?)
|
||||
uint32 petitionGuidLow = GUID_LOPART(petitionguid);
|
||||
@@ -310,14 +305,14 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket& recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetitionQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetitionQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_QUERY"); // ok
|
||||
|
||||
uint32 guildguid;
|
||||
uint64 petitionguid;
|
||||
recv_data >> guildguid; // in Trinity always same as GUID_LOPART(petitionguid)
|
||||
recv_data >> petitionguid; // petition guid
|
||||
recvData >> guildguid; // in Trinity always same as GUID_LOPART(petitionguid)
|
||||
recvData >> petitionguid; // petition guid
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_PETITION_QUERY Petition GUID %u Guild GUID %u", GUID_LOPART(petitionguid), guildguid);
|
||||
|
||||
SendPetitionQueryOpcode(petitionguid);
|
||||
@@ -355,8 +350,9 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
|
||||
data << uint8(0); // some string
|
||||
if (type == GUILD_CHARTER_TYPE)
|
||||
{
|
||||
data << uint32(9);
|
||||
data << uint32(9);
|
||||
uint32 needed = sWorld->getIntConfig(CONFIG_MIN_PETITION_SIGNS);
|
||||
data << uint32(needed);
|
||||
data << uint32(needed);
|
||||
data << uint32(0); // bypass client - side limitation, a different value is needed here for each petition
|
||||
}
|
||||
else
|
||||
@@ -379,15 +375,12 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
|
||||
|
||||
data << uint32(0); // 14
|
||||
|
||||
if (type == GUILD_CHARTER_TYPE)
|
||||
data << uint32(0); // 15 0 - guild, 1 - arena team
|
||||
else
|
||||
data << uint32(1);
|
||||
data << uint32(type != GUILD_CHARTER_TYPE); // 15 0 - guild, 1 - arena team
|
||||
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_RENAME"); // ok
|
||||
|
||||
@@ -395,8 +388,8 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
|
||||
uint32 type;
|
||||
std::string newName;
|
||||
|
||||
recv_data >> petitionGuid; // guid
|
||||
recv_data >> newName; // new name
|
||||
recvData >> petitionGuid; // guid
|
||||
recvData >> newName; // new name
|
||||
|
||||
Item* item = _player->GetItemByGuid(petitionGuid);
|
||||
if (!item)
|
||||
@@ -423,12 +416,12 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
if (sGuildMgr->GetGuildByName(newName))
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NAME_EXISTS_S, newName);
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NAME_EXISTS_S, newName);
|
||||
return;
|
||||
}
|
||||
if (sObjectMgr->IsReservedName(newName) || !ObjectMgr::IsValidCharterName(newName))
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NAME_INVALID, newName);
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NAME_INVALID, newName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -460,15 +453,15 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetitionSignOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_PETITION_SIGN"); // ok
|
||||
|
||||
Field* fields;
|
||||
uint64 petitionGuid;
|
||||
uint8 unk;
|
||||
recv_data >> petitionGuid; // petition guid
|
||||
recv_data >> unk;
|
||||
recvData >> petitionGuid; // petition guid
|
||||
recvData >> unk;
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PETITION_SIGNATURES);
|
||||
|
||||
@@ -498,7 +491,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
|
||||
if (type != GUILD_CHARTER_TYPE)
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
|
||||
else
|
||||
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NOT_ALLIED);
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NOT_ALLIED);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -530,12 +523,12 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
if (_player->GetGuildId())
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_INVITE_S, ERR_ALREADY_IN_GUILD_S, _player->GetName().c_str());
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_INVITE, ERR_ALREADY_IN_GUILD_S, _player->GetName());
|
||||
return;
|
||||
}
|
||||
if (_player->GetGuildIdInvited())
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_INVITE_S, ERR_ALREADY_INVITED_TO_GUILD_S, _player->GetName().c_str());
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_INVITE, ERR_ALREADY_INVITED_TO_GUILD_S, _player->GetName());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -597,13 +590,13 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
|
||||
owner->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode MSG_PETITION_DECLINE"); // ok
|
||||
|
||||
uint64 petitionguid;
|
||||
uint64 ownerguid;
|
||||
recv_data >> petitionguid; // petition guid
|
||||
recvData >> petitionguid; // petition guid
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Petition %u declined by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PETITION_OWNER_BY_GUID);
|
||||
@@ -627,7 +620,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_OFFER_PETITION"); // ok
|
||||
|
||||
@@ -635,9 +628,9 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
|
||||
uint64 petitionguid, plguid;
|
||||
uint32 type, junk;
|
||||
Player* player;
|
||||
recv_data >> junk; // this is not petition type!
|
||||
recv_data >> petitionguid; // petition guid
|
||||
recv_data >> plguid; // player guid
|
||||
recvData >> junk; // this is not petition type!
|
||||
recvData >> petitionguid; // petition guid
|
||||
recvData >> plguid; // player guid
|
||||
|
||||
player = ObjectAccessor::FindPlayer(plguid);
|
||||
if (!player)
|
||||
@@ -662,7 +655,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
|
||||
if (type != GUILD_CHARTER_TYPE)
|
||||
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
|
||||
else
|
||||
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NOT_ALLIED);
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NOT_ALLIED);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -696,13 +689,13 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
if (player->GetGuildId())
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_INVITE_S, ERR_ALREADY_IN_GUILD_S, _player->GetName().c_str());
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_INVITE, ERR_ALREADY_IN_GUILD_S, _player->GetName());
|
||||
return;
|
||||
}
|
||||
|
||||
if (player->GetGuildIdInvited())
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_INVITE_S, ERR_ALREADY_INVITED_TO_GUILD_S, _player->GetName().c_str());
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_INVITE, ERR_ALREADY_INVITED_TO_GUILD_S, _player->GetName());
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -736,7 +729,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received opcode CMSG_TURN_IN_PETITION");
|
||||
|
||||
@@ -744,7 +737,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||
WorldPacket data;
|
||||
uint64 petitionGuid;
|
||||
|
||||
recv_data >> petitionGuid;
|
||||
recvData >> petitionGuid;
|
||||
|
||||
// Check if player really has the required petition charter
|
||||
Item* item = _player->GetItemByGuid(petitionGuid);
|
||||
@@ -794,7 +787,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||
// Check if guild name is already taken
|
||||
if (sGuildMgr->GetGuildByName(name))
|
||||
{
|
||||
Guild::SendCommandResult(this, GUILD_CREATE_S, ERR_GUILD_NAME_EXISTS_S, name);
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_NAME_EXISTS_S, name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -866,6 +859,8 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||
// Register guild and add guild master
|
||||
sGuildMgr->AddGuild(guild);
|
||||
|
||||
Guild::SendCommandResult(this, GUILD_COMMAND_CREATE, ERR_GUILD_COMMAND_SUCCESS, name);
|
||||
|
||||
// Add members from signatures
|
||||
for (uint8 i = 0; i < signatures; ++i)
|
||||
{
|
||||
@@ -878,7 +873,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
// Receive the rest of the packet in arena team creation case
|
||||
uint32 background, icon, iconcolor, border, bordercolor;
|
||||
recv_data >> background >> icon >> iconcolor >> border >> bordercolor;
|
||||
recvData >> background >> icon >> iconcolor >> border >> bordercolor;
|
||||
|
||||
// Create arena team
|
||||
ArenaTeam* arenaTeam = new ArenaTeam();
|
||||
@@ -924,12 +919,12 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "Received CMSG_PETITION_SHOWLIST");
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
SendPetitionShowList(guid);
|
||||
}
|
||||
@@ -954,7 +949,7 @@ void WorldSession::SendPetitionShowList(uint64 guid)
|
||||
data << uint32(CHARTER_DISPLAY_ID); // charter display id
|
||||
data << uint32(GUILD_CHARTER_COST); // charter cost
|
||||
data << uint32(0); // unknown
|
||||
data << uint32(9); // required signs?
|
||||
data << uint32(sWorld->getIntConfig(CONFIG_MIN_PETITION_SIGNS)); // required signs
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -64,10 +64,10 @@ void WorldSession::SendNameQueryOpcode(uint64 guid)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleNameQueryOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleNameQueryOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
// This is disable by default to prevent lots of console spam
|
||||
// sLog->outInfo(LOG_FILTER_NETWORKIO, "HandleNameQueryOpcode %u", guid);
|
||||
@@ -75,7 +75,7 @@ void WorldSession::HandleNameQueryOpcode(WorldPacket& recv_data)
|
||||
SendNameQueryOpcode(guid);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQueryTimeOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleQueryTimeOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
SendQueryTimeResponse();
|
||||
}
|
||||
@@ -89,12 +89,12 @@ void WorldSession::SendQueryTimeResponse()
|
||||
}
|
||||
|
||||
/// Only _static_ data is sent in this packet !!!
|
||||
void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint32 entry;
|
||||
recv_data >> entry;
|
||||
recvData >> entry;
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(entry);
|
||||
if (ci)
|
||||
@@ -152,12 +152,12 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
/// Only _static_ data is sent in this packet !!!
|
||||
void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint32 entry;
|
||||
recv_data >> entry;
|
||||
recvData >> entry;
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
const GameObjectTemplate* info = sObjectMgr->GetGameObjectTemplate(entry);
|
||||
if (info)
|
||||
@@ -207,7 +207,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received MSG_CORPSE_QUERY");
|
||||
|
||||
@@ -258,15 +258,15 @@ void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint32 textID;
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> textID;
|
||||
recvData >> textID;
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
|
||||
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
GetPlayer()->SetSelection(guid);
|
||||
|
||||
GossipText const* pGossip = sObjectMgr->GetGossipText(textID);
|
||||
@@ -342,13 +342,13 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
|
||||
/// Only _static_ data is sent in this packet !!!
|
||||
void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_PAGE_TEXT_QUERY");
|
||||
|
||||
uint32 pageID;
|
||||
recv_data >> pageID;
|
||||
recv_data.read_skip<uint64>(); // guid
|
||||
recvData >> pageID;
|
||||
recvData.read_skip<uint64>(); // guid
|
||||
|
||||
while (pageID)
|
||||
{
|
||||
@@ -382,12 +382,12 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleCorpseMapPositionQuery(WorldPacket & recv_data)
|
||||
void WorldSession::HandleCorpseMapPositionQuery(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY");
|
||||
|
||||
uint32 unk;
|
||||
recv_data >> unk;
|
||||
recvData >> unk;
|
||||
|
||||
WorldPacket data(SMSG_CORPSE_MAP_POSITION_QUERY_RESPONSE, 4+4+4+4);
|
||||
data << float(0);
|
||||
@@ -397,14 +397,14 @@ void WorldSession::HandleCorpseMapPositionQuery(WorldPacket & recv_data)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
|
||||
void WorldSession::HandleQuestPOIQuery(WorldPacket& recvData)
|
||||
{
|
||||
uint32 count;
|
||||
recv_data >> count; // quest count, max=25
|
||||
recvData >> count; // quest count, max=25
|
||||
|
||||
if (count >= MAX_QUEST_LOG_SIZE)
|
||||
{
|
||||
recv_data.rfinish();
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
|
||||
for (uint32 i = 0; i < count; ++i)
|
||||
{
|
||||
uint32 questId;
|
||||
recv_data >> questId; // quest id
|
||||
recvData >> questId; // quest id
|
||||
|
||||
bool questOk = false;
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "GameObjectAI.h"
|
||||
|
||||
void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
uint8 questStatus = DIALOG_STATUS_NONE;
|
||||
uint8 defstatus = DIALOG_STATUS_NONE;
|
||||
|
||||
@@ -79,10 +79,10 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data)
|
||||
_player->PlayerTalkClass->SendQuestGiverStatus(questStatus, guid);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_HELLO npc = %u", GUID_LOPART(guid));
|
||||
|
||||
@@ -109,12 +109,12 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data)
|
||||
creature->AI()->sGossipHello(_player);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
uint32 questId;
|
||||
uint32 unk1;
|
||||
recv_data >> guid >> questId >> unk1;
|
||||
recvData >> guid >> questId >> unk1;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), questId, unk1);
|
||||
|
||||
@@ -230,12 +230,12 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode(WorldPacket & recv_data)
|
||||
_player->PlayerTalkClass->SendCloseGossip();
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
uint32 questId;
|
||||
uint8 unk1;
|
||||
recv_data >> guid >> questId >> unk1;
|
||||
recvData >> guid >> questId >> unk1;
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), questId, unk1);
|
||||
|
||||
// Verify that the guid is valid and is a questgiver or involved in the requested quest
|
||||
@@ -268,24 +268,24 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleQuestQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
if (!_player)
|
||||
return;
|
||||
|
||||
uint32 questId;
|
||||
recv_data >> questId;
|
||||
recvData >> questId;
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUEST_QUERY quest = %u", questId);
|
||||
|
||||
if (Quest const* quest = sObjectMgr->GetQuestTemplate(questId))
|
||||
_player->PlayerTalkClass->SendQuestQueryResponse(quest);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint32 questId, reward;
|
||||
uint64 guid;
|
||||
recv_data >> guid >> questId >> reward;
|
||||
recvData >> guid >> questId >> reward;
|
||||
|
||||
if (reward >= QUEST_REWARD_CHOICES_COUNT)
|
||||
{
|
||||
@@ -365,11 +365,11 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint32 questId;
|
||||
uint64 guid;
|
||||
recv_data >> guid >> questId;
|
||||
recvData >> guid >> questId;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %u, quest = %u", uint32(GUID_LOPART(guid)), questId);
|
||||
|
||||
@@ -391,17 +391,17 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recv_data)
|
||||
_player->PlayerTalkClass->SendQuestGiverOfferReward(quest, guid, true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestgiverCancel(WorldPacket& /*recv_data*/)
|
||||
void WorldSession::HandleQuestgiverCancel(WorldPacket& /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_CANCEL");
|
||||
|
||||
_player->PlayerTalkClass->SendCloseGossip();
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestLogSwapQuest(WorldPacket& recv_data)
|
||||
void WorldSession::HandleQuestLogSwapQuest(WorldPacket& recvData)
|
||||
{
|
||||
uint8 slot1, slot2;
|
||||
recv_data >> slot1 >> slot2;
|
||||
recvData >> slot1 >> slot2;
|
||||
|
||||
if (slot1 == slot2 || slot1 >= MAX_QUEST_LOG_SIZE || slot2 >= MAX_QUEST_LOG_SIZE)
|
||||
return;
|
||||
@@ -411,10 +411,10 @@ void WorldSession::HandleQuestLogSwapQuest(WorldPacket& recv_data)
|
||||
GetPlayer()->SwapQuestSlot(slot1, slot2);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data)
|
||||
void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recvData)
|
||||
{
|
||||
uint8 slot;
|
||||
recv_data >> slot;
|
||||
recvData >> slot;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u", slot);
|
||||
|
||||
@@ -444,10 +444,10 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
|
||||
void WorldSession::HandleQuestConfirmAccept(WorldPacket& recvData)
|
||||
{
|
||||
uint32 questId;
|
||||
recv_data >> questId;
|
||||
recvData >> questId;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", questId);
|
||||
|
||||
@@ -479,12 +479,12 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
|
||||
void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recvData)
|
||||
{
|
||||
uint32 questId;
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> guid >> questId;
|
||||
recvData >> guid >> questId;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u", uint32(GUID_LOPART(guid)), questId);
|
||||
|
||||
@@ -760,7 +760,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQueryQuestsCompleted(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleQueryQuestsCompleted(WorldPacket & /*recvData*/)
|
||||
{
|
||||
size_t rew_count = _player->GetRewardedQuestCount();
|
||||
|
||||
|
||||
@@ -21,12 +21,12 @@
|
||||
#include "Opcodes.h"
|
||||
#include "Log.h"
|
||||
|
||||
void WorldSession::HandleGrantLevel(WorldPacket& recv_data)
|
||||
void WorldSession::HandleGrantLevel(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GRANT_LEVEL");
|
||||
|
||||
uint64 guid;
|
||||
recv_data.readPackGUID(guid);
|
||||
recvData.readPackGUID(guid);
|
||||
|
||||
Player* target = ObjectAccessor::GetObjectInWorld(guid, _player);
|
||||
|
||||
@@ -63,12 +63,12 @@ void WorldSession::HandleGrantLevel(WorldPacket& recv_data)
|
||||
target->GetSession()->SendPacket(&data2);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAcceptGrantLevel(WorldPacket& recv_data)
|
||||
void WorldSession::HandleAcceptGrantLevel(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_ACCEPT_LEVEL_GRANT");
|
||||
|
||||
uint64 guid;
|
||||
recv_data.readPackGUID(guid);
|
||||
recvData.readPackGUID(guid);
|
||||
|
||||
Player* other = ObjectAccessor::GetObjectInWorld(guid, _player);
|
||||
if (!(other && other->GetSession()))
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
#include "ObjectAccessor.h"
|
||||
#include "UpdateMask.h"
|
||||
|
||||
void WorldSession::HandleLearnTalentOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleLearnTalentOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint32 talent_id, requested_rank;
|
||||
recv_data >> talent_id >> requested_rank;
|
||||
recvData >> talent_id >> requested_rank;
|
||||
|
||||
_player->LearnTalent(talent_id, requested_rank);
|
||||
_player->SendTalentsInfoData(false);
|
||||
@@ -54,11 +54,11 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
|
||||
_player->SendTalentsInfoData(false);
|
||||
}
|
||||
|
||||
void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "MSG_TALENT_WIPE_CONFIRM");
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
|
||||
if (!unit)
|
||||
|
||||
@@ -269,11 +269,11 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
|
||||
pUser->SendLoot(item->GetGUID(), LOOT_CORPSE);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGameObjectUseOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleGameObjectUseOpcode(WorldPacket & recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid));
|
||||
|
||||
@@ -485,9 +485,9 @@ void WorldSession::HandleCancelAutoRepeatSpellOpcode(WorldPacket& /*recvPacket*/
|
||||
_player->InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
|
||||
}
|
||||
|
||||
void WorldSession::HandleCancelChanneling(WorldPacket & recv_data)
|
||||
void WorldSession::HandleCancelChanneling(WorldPacket & recvData)
|
||||
{
|
||||
recv_data.read_skip<uint32>(); // spellid, not used
|
||||
recvData.read_skip<uint32>(); // spellid, not used
|
||||
|
||||
// ignore for remote control state (for player case)
|
||||
Unit* mover = _player->m_mover;
|
||||
@@ -520,7 +520,7 @@ void WorldSession::HandleTotemDestroyed(WorldPacket& recvPacket)
|
||||
totem->ToTotem()->UnSummon();
|
||||
}
|
||||
|
||||
void WorldSession::HandleSelfResOpcode(WorldPacket & /*recv_data*/)
|
||||
void WorldSession::HandleSelfResOpcode(WorldPacket & /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SELF_RES"); // empty opcode
|
||||
|
||||
@@ -537,10 +537,10 @@ void WorldSession::HandleSelfResOpcode(WorldPacket & /*recv_data*/)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleSpellClick(WorldPacket& recv_data)
|
||||
void WorldSession::HandleSpellClick(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
// this will get something not in world. crash
|
||||
Creature* unit = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
|
||||
@@ -555,11 +555,11 @@ void WorldSession::HandleSpellClick(WorldPacket& recv_data)
|
||||
unit->HandleSpellClick(_player);
|
||||
}
|
||||
|
||||
void WorldSession::HandleMirrorImageDataRequest(WorldPacket & recv_data)
|
||||
void WorldSession::HandleMirrorImageDataRequest(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_GET_MIRRORIMAGE_DATA");
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
// Get unit for which data is needed by client
|
||||
Unit* unit = ObjectAccessor::GetObjectInWorld(guid, (Unit*)NULL);
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
#include "Path.h"
|
||||
#include "WaypointMovementGenerator.h"
|
||||
|
||||
void WorldSession::HandleTaxiNodeStatusQueryOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleTaxiNodeStatusQueryOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TAXINODE_STATUS_QUERY");
|
||||
|
||||
uint64 guid;
|
||||
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
SendTaxiStatus(guid);
|
||||
}
|
||||
|
||||
@@ -63,12 +63,12 @@ void WorldSession::SendTaxiStatus(uint64 guid)
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Sent SMSG_TAXINODE_STATUS");
|
||||
}
|
||||
|
||||
void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recv_data)
|
||||
void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_TAXIQUERYAVAILABLENODES");
|
||||
|
||||
uint64 guid;
|
||||
recv_data >> guid;
|
||||
recvData >> guid;
|
||||
|
||||
// cheating checks
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||
@@ -163,14 +163,14 @@ void WorldSession::SendDiscoverNewTaxiNode(uint32 nodeid)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recv_data)
|
||||
void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXIEXPRESS");
|
||||
|
||||
uint64 guid;
|
||||
uint32 node_count;
|
||||
|
||||
recv_data >> guid >> node_count;
|
||||
recvData >> guid >> node_count;
|
||||
|
||||
Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||
if (!npc)
|
||||
@@ -183,7 +183,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recv_data)
|
||||
for (uint32 i = 0; i < node_count; ++i)
|
||||
{
|
||||
uint32 node;
|
||||
recv_data >> node;
|
||||
recvData >> node;
|
||||
nodes.push_back(node);
|
||||
}
|
||||
|
||||
@@ -195,17 +195,17 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recv_data)
|
||||
GetPlayer()->ActivateTaxiPathTo(nodes, npc);
|
||||
}
|
||||
|
||||
void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_MOVE_SPLINE_DONE");
|
||||
|
||||
uint64 guid; // used only for proper packet read
|
||||
recv_data.readPackGUID(guid);
|
||||
recvData.readPackGUID(guid);
|
||||
|
||||
MovementInfo movementInfo; // used only for proper packet read
|
||||
ReadMovementInfo(recv_data, &movementInfo);
|
||||
ReadMovementInfo(recvData, &movementInfo);
|
||||
|
||||
recv_data.read_skip<uint32>(); // unk
|
||||
recvData.read_skip<uint32>(); // unk
|
||||
|
||||
// in taxi flight packet received in 2 case:
|
||||
// 1) end taxi path in far (multi-node) flight
|
||||
@@ -273,7 +273,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
|
||||
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleActivateTaxiOpcode(WorldPacket & recv_data)
|
||||
void WorldSession::HandleActivateTaxiOpcode(WorldPacket & recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI");
|
||||
|
||||
@@ -281,7 +281,7 @@ void WorldSession::HandleActivateTaxiOpcode(WorldPacket & recv_data)
|
||||
std::vector<uint32> nodes;
|
||||
nodes.resize(2);
|
||||
|
||||
recv_data >> guid >> nodes[0] >> nodes[1];
|
||||
recvData >> guid >> nodes[0] >> nodes[1];
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_ACTIVATETAXI from %d to %d", nodes[0], nodes[1]);
|
||||
Creature* npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||
if (!npc)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "Log.h"
|
||||
#include "ObjectAccessor.h"
|
||||
|
||||
void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
|
||||
void WorldSession::HandleDismissControlledVehicle(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE");
|
||||
|
||||
@@ -31,44 +31,44 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
|
||||
|
||||
if (!vehicleGUID) // something wrong here...
|
||||
{
|
||||
recv_data.rfinish(); // prevent warnings spam
|
||||
recvData.rfinish(); // prevent warnings spam
|
||||
return;
|
||||
}
|
||||
|
||||
uint64 guid;
|
||||
|
||||
recv_data.readPackGUID(guid);
|
||||
recvData.readPackGUID(guid);
|
||||
|
||||
MovementInfo mi;
|
||||
mi.guid = guid;
|
||||
ReadMovementInfo(recv_data, &mi);
|
||||
ReadMovementInfo(recvData, &mi);
|
||||
|
||||
_player->m_movementInfo = mi;
|
||||
|
||||
_player->ExitVehicle();
|
||||
}
|
||||
|
||||
void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data)
|
||||
void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE");
|
||||
|
||||
Unit* vehicle_base = GetPlayer()->GetVehicleBase();
|
||||
if (!vehicle_base)
|
||||
{
|
||||
recv_data.rfinish(); // prevent warnings spam
|
||||
recvData.rfinish(); // prevent warnings spam
|
||||
return;
|
||||
}
|
||||
|
||||
VehicleSeatEntry const* seat = GetPlayer()->GetVehicle()->GetSeatForPassenger(GetPlayer());
|
||||
if (!seat->CanSwitchFromSeat())
|
||||
{
|
||||
recv_data.rfinish(); // prevent warnings spam
|
||||
recvData.rfinish(); // prevent warnings spam
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "HandleChangeSeatsOnControlledVehicle, Opcode: %u, Player %u tried to switch seats but current seatflags %u don't permit that.",
|
||||
recv_data.GetOpcode(), GetPlayer()->GetGUIDLow(), seat->m_flags);
|
||||
recvData.GetOpcode(), GetPlayer()->GetGUIDLow(), seat->m_flags);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (recv_data.GetOpcode())
|
||||
switch (recvData.GetOpcode())
|
||||
{
|
||||
case CMSG_REQUEST_VEHICLE_PREV_SEAT:
|
||||
GetPlayer()->ChangeSeat(-1, false);
|
||||
@@ -79,17 +79,17 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data)
|
||||
case CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE:
|
||||
{
|
||||
uint64 guid; // current vehicle guid
|
||||
recv_data.readPackGUID(guid);
|
||||
recvData.readPackGUID(guid);
|
||||
|
||||
MovementInfo movementInfo;
|
||||
ReadMovementInfo(recv_data, &movementInfo);
|
||||
ReadMovementInfo(recvData, &movementInfo);
|
||||
vehicle_base->m_movementInfo = movementInfo;
|
||||
|
||||
uint64 accessory; // accessory guid
|
||||
recv_data.readPackGUID(accessory);
|
||||
recvData.readPackGUID(accessory);
|
||||
|
||||
int8 seatId;
|
||||
recv_data >> seatId;
|
||||
recvData >> seatId;
|
||||
|
||||
if (vehicle_base->GetGUID() != guid)
|
||||
return;
|
||||
@@ -107,10 +107,10 @@ void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data)
|
||||
case CMSG_REQUEST_VEHICLE_SWITCH_SEAT:
|
||||
{
|
||||
uint64 guid; // current vehicle guid
|
||||
recv_data.readPackGUID(guid);
|
||||
recvData.readPackGUID(guid);
|
||||
|
||||
int8 seatId;
|
||||
recv_data >> seatId;
|
||||
recvData >> seatId;
|
||||
|
||||
if (vehicle_base->GetGUID() == guid)
|
||||
GetPlayer()->ChangeSeat(seatId);
|
||||
@@ -209,7 +209,7 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data)
|
||||
sLog->outError(LOG_FILTER_NETWORKIO, "HandleEjectPassenger: Player %u tried to eject invalid GUID "UI64FMTD, GetPlayer()->GetGUIDLow(), guid);
|
||||
}
|
||||
|
||||
void WorldSession::HandleRequestVehicleExit(WorldPacket& /*recv_data*/)
|
||||
void WorldSession::HandleRequestVehicleExit(WorldPacket& /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Recvd CMSG_REQUEST_VEHICLE_EXIT");
|
||||
|
||||
|
||||
@@ -22,24 +22,24 @@
|
||||
#include "Opcodes.h"
|
||||
#include "Log.h"
|
||||
|
||||
void WorldSession::HandleVoiceSessionEnableOpcode(WorldPacket& recv_data)
|
||||
void WorldSession::HandleVoiceSessionEnableOpcode(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_VOICE_SESSION_ENABLE");
|
||||
// uint8 isVoiceEnabled, uint8 isMicrophoneEnabled
|
||||
recv_data.read_skip<uint8>();
|
||||
recv_data.read_skip<uint8>();
|
||||
recvData.read_skip<uint8>();
|
||||
recvData.read_skip<uint8>();
|
||||
}
|
||||
|
||||
void WorldSession::HandleChannelVoiceOnOpcode(WorldPacket& /*recv_data*/)
|
||||
void WorldSession::HandleChannelVoiceOnOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_CHANNEL_VOICE_ON");
|
||||
// Enable Voice button in channel context menu
|
||||
}
|
||||
|
||||
void WorldSession::HandleSetActiveVoiceChannel(WorldPacket& recv_data)
|
||||
void WorldSession::HandleSetActiveVoiceChannel(WorldPacket& recvData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL");
|
||||
recv_data.read_skip<uint32>();
|
||||
recv_data.read_skip<char*>();
|
||||
recvData.read_skip<uint32>();
|
||||
recvData.read_skip<char*>();
|
||||
}
|
||||
|
||||
|
||||
@@ -418,7 +418,7 @@ class WorldSession
|
||||
void HandlePlayerLoginOpcode(WorldPacket& recvPacket);
|
||||
void HandleCharEnum(PreparedQueryResult result);
|
||||
void HandlePlayerLogin(LoginQueryHolder * holder);
|
||||
void HandleCharFactionOrRaceChange(WorldPacket& recv_data);
|
||||
void HandleCharFactionOrRaceChange(WorldPacket& recvData);
|
||||
|
||||
// played time
|
||||
void HandlePlayedTime(WorldPacket& recvPacket);
|
||||
@@ -435,15 +435,15 @@ class WorldSession
|
||||
void HandleInspectHonorStatsOpcode(WorldPacket& recvPacket);
|
||||
|
||||
void HandleMoveWaterWalkAck(WorldPacket& recvPacket);
|
||||
void HandleFeatherFallAck(WorldPacket& recv_data);
|
||||
void HandleFeatherFallAck(WorldPacket& recvData);
|
||||
|
||||
void HandleMoveHoverAck(WorldPacket& recv_data);
|
||||
void HandleMoveHoverAck(WorldPacket& recvData);
|
||||
|
||||
void HandleMountSpecialAnimOpcode(WorldPacket& recvdata);
|
||||
|
||||
// character view
|
||||
void HandleShowingHelmOpcode(WorldPacket& recv_data);
|
||||
void HandleShowingCloakOpcode(WorldPacket& recv_data);
|
||||
void HandleShowingHelmOpcode(WorldPacket& recvData);
|
||||
void HandleShowingCloakOpcode(WorldPacket& recvData);
|
||||
|
||||
// repair
|
||||
void HandleRepairItemOpcode(WorldPacket& recvPacket);
|
||||
@@ -452,7 +452,7 @@ class WorldSession
|
||||
void HandleMoveKnockBackAck(WorldPacket& recvPacket);
|
||||
|
||||
void HandleMoveTeleportAck(WorldPacket& recvPacket);
|
||||
void HandleForceSpeedChangeAck(WorldPacket& recv_data);
|
||||
void HandleForceSpeedChangeAck(WorldPacket& recvData);
|
||||
|
||||
void HandlePingOpcode(WorldPacket& recvPacket);
|
||||
void HandleAuthSessionOpcode(WorldPacket& recvPacket);
|
||||
@@ -497,10 +497,10 @@ class WorldSession
|
||||
|
||||
void HandleAreaTriggerOpcode(WorldPacket& recvPacket);
|
||||
|
||||
void HandleSetFactionAtWar(WorldPacket& recv_data);
|
||||
void HandleSetFactionCheat(WorldPacket& recv_data);
|
||||
void HandleSetWatchedFactionOpcode(WorldPacket& recv_data);
|
||||
void HandleSetFactionInactiveOpcode(WorldPacket& recv_data);
|
||||
void HandleSetFactionAtWar(WorldPacket& recvData);
|
||||
void HandleSetFactionCheat(WorldPacket& recvData);
|
||||
void HandleSetWatchedFactionOpcode(WorldPacket& recvData);
|
||||
void HandleSetFactionInactiveOpcode(WorldPacket& recvData);
|
||||
|
||||
void HandleUpdateAccountData(WorldPacket& recvPacket);
|
||||
void HandleRequestAccountData(WorldPacket& recvPacket);
|
||||
@@ -522,17 +522,17 @@ class WorldSession
|
||||
void HandleMoveWorldportAckOpcode(); // for server-side calls
|
||||
|
||||
void HandleMovementOpcodes(WorldPacket& recvPacket);
|
||||
void HandleSetActiveMoverOpcode(WorldPacket& recv_data);
|
||||
void HandleMoveNotActiveMover(WorldPacket& recv_data);
|
||||
void HandleDismissControlledVehicle(WorldPacket& recv_data);
|
||||
void HandleRequestVehicleExit(WorldPacket& recv_data);
|
||||
void HandleChangeSeatsOnControlledVehicle(WorldPacket& recv_data);
|
||||
void HandleMoveTimeSkippedOpcode(WorldPacket& recv_data);
|
||||
void HandleSetActiveMoverOpcode(WorldPacket& recvData);
|
||||
void HandleMoveNotActiveMover(WorldPacket& recvData);
|
||||
void HandleDismissControlledVehicle(WorldPacket& recvData);
|
||||
void HandleRequestVehicleExit(WorldPacket& recvData);
|
||||
void HandleChangeSeatsOnControlledVehicle(WorldPacket& recvData);
|
||||
void HandleMoveTimeSkippedOpcode(WorldPacket& recvData);
|
||||
|
||||
void HandleRequestRaidInfoOpcode(WorldPacket& recv_data);
|
||||
void HandleRequestRaidInfoOpcode(WorldPacket& recvData);
|
||||
|
||||
void HandleBattlefieldStatusOpcode(WorldPacket& recv_data);
|
||||
void HandleBattleMasterHelloOpcode(WorldPacket& recv_data);
|
||||
void HandleBattlefieldStatusOpcode(WorldPacket& recvData);
|
||||
void HandleBattleMasterHelloOpcode(WorldPacket& recvData);
|
||||
|
||||
void HandleGroupInviteOpcode(WorldPacket& recvPacket);
|
||||
//void HandleGroupCancelOpcode(WorldPacket& recvPacket);
|
||||
@@ -542,26 +542,26 @@ class WorldSession
|
||||
void HandleGroupUninviteGuidOpcode(WorldPacket& recvPacket);
|
||||
void HandleGroupSetLeaderOpcode(WorldPacket& recvPacket);
|
||||
void HandleGroupDisbandOpcode(WorldPacket& recvPacket);
|
||||
void HandleOptOutOfLootOpcode(WorldPacket& recv_data);
|
||||
void HandleOptOutOfLootOpcode(WorldPacket& recvData);
|
||||
void HandleLootMethodOpcode(WorldPacket& recvPacket);
|
||||
void HandleLootRoll(WorldPacket& recv_data);
|
||||
void HandleRequestPartyMemberStatsOpcode(WorldPacket& recv_data);
|
||||
void HandleRaidTargetUpdateOpcode(WorldPacket& recv_data);
|
||||
void HandleRaidReadyCheckOpcode(WorldPacket& recv_data);
|
||||
void HandleRaidReadyCheckFinishedOpcode(WorldPacket& recv_data);
|
||||
void HandleGroupRaidConvertOpcode(WorldPacket& recv_data);
|
||||
void HandleGroupChangeSubGroupOpcode(WorldPacket& recv_data);
|
||||
void HandleGroupAssistantLeaderOpcode(WorldPacket& recv_data);
|
||||
void HandlePartyAssignmentOpcode(WorldPacket& recv_data);
|
||||
void HandleLootRoll(WorldPacket& recvData);
|
||||
void HandleRequestPartyMemberStatsOpcode(WorldPacket& recvData);
|
||||
void HandleRaidTargetUpdateOpcode(WorldPacket& recvData);
|
||||
void HandleRaidReadyCheckOpcode(WorldPacket& recvData);
|
||||
void HandleRaidReadyCheckFinishedOpcode(WorldPacket& recvData);
|
||||
void HandleGroupRaidConvertOpcode(WorldPacket& recvData);
|
||||
void HandleGroupChangeSubGroupOpcode(WorldPacket& recvData);
|
||||
void HandleGroupAssistantLeaderOpcode(WorldPacket& recvData);
|
||||
void HandlePartyAssignmentOpcode(WorldPacket& recvData);
|
||||
|
||||
void HandlePetitionBuyOpcode(WorldPacket& recv_data);
|
||||
void HandlePetitionShowSignOpcode(WorldPacket& recv_data);
|
||||
void HandlePetitionQueryOpcode(WorldPacket& recv_data);
|
||||
void HandlePetitionRenameOpcode(WorldPacket& recv_data);
|
||||
void HandlePetitionSignOpcode(WorldPacket& recv_data);
|
||||
void HandlePetitionDeclineOpcode(WorldPacket& recv_data);
|
||||
void HandleOfferPetitionOpcode(WorldPacket& recv_data);
|
||||
void HandleTurnInPetitionOpcode(WorldPacket& recv_data);
|
||||
void HandlePetitionBuyOpcode(WorldPacket& recvData);
|
||||
void HandlePetitionShowSignOpcode(WorldPacket& recvData);
|
||||
void HandlePetitionQueryOpcode(WorldPacket& recvData);
|
||||
void HandlePetitionRenameOpcode(WorldPacket& recvData);
|
||||
void HandlePetitionSignOpcode(WorldPacket& recvData);
|
||||
void HandlePetitionDeclineOpcode(WorldPacket& recvData);
|
||||
void HandleOfferPetitionOpcode(WorldPacket& recvData);
|
||||
void HandleTurnInPetitionOpcode(WorldPacket& recvData);
|
||||
|
||||
void HandleGuildQueryOpcode(WorldPacket& recvPacket);
|
||||
void HandleGuildCreateOpcode(WorldPacket& recvPacket);
|
||||
@@ -629,25 +629,25 @@ class WorldSession
|
||||
void HandleUnacceptTradeOpcode(WorldPacket& recvPacket);
|
||||
|
||||
void HandleAuctionHelloOpcode(WorldPacket& recvPacket);
|
||||
void HandleAuctionListItems(WorldPacket& recv_data);
|
||||
void HandleAuctionListBidderItems(WorldPacket& recv_data);
|
||||
void HandleAuctionSellItem(WorldPacket& recv_data);
|
||||
void HandleAuctionRemoveItem(WorldPacket& recv_data);
|
||||
void HandleAuctionListOwnerItems(WorldPacket& recv_data);
|
||||
void HandleAuctionPlaceBid(WorldPacket& recv_data);
|
||||
void HandleAuctionListPendingSales(WorldPacket& recv_data);
|
||||
void HandleAuctionListItems(WorldPacket& recvData);
|
||||
void HandleAuctionListBidderItems(WorldPacket& recvData);
|
||||
void HandleAuctionSellItem(WorldPacket& recvData);
|
||||
void HandleAuctionRemoveItem(WorldPacket& recvData);
|
||||
void HandleAuctionListOwnerItems(WorldPacket& recvData);
|
||||
void HandleAuctionPlaceBid(WorldPacket& recvData);
|
||||
void HandleAuctionListPendingSales(WorldPacket& recvData);
|
||||
|
||||
void HandleGetMailList(WorldPacket& recv_data);
|
||||
void HandleSendMail(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 HandleQueryNextMailTime(WorldPacket& recv_data);
|
||||
void HandleCancelChanneling(WorldPacket& recv_data);
|
||||
void HandleGetMailList(WorldPacket& recvData);
|
||||
void HandleSendMail(WorldPacket& recvData);
|
||||
void HandleMailTakeMoney(WorldPacket& recvData);
|
||||
void HandleMailTakeItem(WorldPacket& recvData);
|
||||
void HandleMailMarkAsRead(WorldPacket& recvData);
|
||||
void HandleMailReturnToSender(WorldPacket& recvData);
|
||||
void HandleMailDelete(WorldPacket& recvData);
|
||||
void HandleItemTextQuery(WorldPacket& recvData);
|
||||
void HandleMailCreateTextItem(WorldPacket& recvData);
|
||||
void HandleQueryNextMailTime(WorldPacket& recvData);
|
||||
void HandleCancelChanneling(WorldPacket& recvData);
|
||||
|
||||
void SendItemPageInfo(ItemTemplate* itemProto);
|
||||
void HandleSplitItemOpcode(WorldPacket& recvPacket);
|
||||
@@ -693,11 +693,11 @@ class WorldSession
|
||||
void HandleQuestgiverChooseRewardOpcode(WorldPacket& recvPacket);
|
||||
void HandleQuestgiverRequestRewardOpcode(WorldPacket& recvPacket);
|
||||
void HandleQuestQueryOpcode(WorldPacket& recvPacket);
|
||||
void HandleQuestgiverCancel(WorldPacket& recv_data);
|
||||
void HandleQuestLogSwapQuest(WorldPacket& recv_data);
|
||||
void HandleQuestLogRemoveQuest(WorldPacket& recv_data);
|
||||
void HandleQuestConfirmAccept(WorldPacket& recv_data);
|
||||
void HandleQuestgiverCompleteQuest(WorldPacket& recv_data);
|
||||
void HandleQuestgiverCancel(WorldPacket& recvData);
|
||||
void HandleQuestLogSwapQuest(WorldPacket& recvData);
|
||||
void HandleQuestLogRemoveQuest(WorldPacket& recvData);
|
||||
void HandleQuestConfirmAccept(WorldPacket& recvData);
|
||||
void HandleQuestgiverCompleteQuest(WorldPacket& recvData);
|
||||
void HandleQuestgiverQuestAutoLaunch(WorldPacket& recvPacket);
|
||||
void HandlePushQuestToParty(WorldPacket& recvPacket);
|
||||
void HandleQuestPushResult(WorldPacket& recvPacket);
|
||||
@@ -714,7 +714,7 @@ class WorldSession
|
||||
void HandleCorpseQueryOpcode(WorldPacket& recvPacket);
|
||||
void HandleCorpseMapPositionQuery(WorldPacket& recvPacket);
|
||||
void HandleResurrectResponseOpcode(WorldPacket& recvPacket);
|
||||
void HandleSummonResponseOpcode(WorldPacket& recv_data);
|
||||
void HandleSummonResponseOpcode(WorldPacket& recvData);
|
||||
|
||||
void HandleJoinChannel(WorldPacket& recvPacket);
|
||||
void HandleLeaveChannel(WorldPacket& recvPacket);
|
||||
@@ -743,58 +743,58 @@ class WorldSession
|
||||
void HandlePageQuerySkippedOpcode(WorldPacket& recvPacket);
|
||||
void HandlePageTextQueryOpcode(WorldPacket& recvPacket);
|
||||
|
||||
void HandleTutorialFlag (WorldPacket& recv_data);
|
||||
void HandleTutorialClear(WorldPacket& recv_data);
|
||||
void HandleTutorialReset(WorldPacket& recv_data);
|
||||
void HandleTutorialFlag (WorldPacket& recvData);
|
||||
void HandleTutorialClear(WorldPacket& recvData);
|
||||
void HandleTutorialReset(WorldPacket& recvData);
|
||||
|
||||
//Pet
|
||||
void HandlePetAction(WorldPacket& recv_data);
|
||||
void HandlePetStopAttack(WorldPacket& recv_data);
|
||||
void HandlePetAction(WorldPacket& recvData);
|
||||
void HandlePetStopAttack(WorldPacket& recvData);
|
||||
void HandlePetActionHelper(Unit* pet, uint64 guid1, uint16 spellid, uint16 flag, uint64 guid2);
|
||||
void HandlePetNameQuery(WorldPacket& recv_data);
|
||||
void HandlePetSetAction(WorldPacket& recv_data);
|
||||
void HandlePetAbandon(WorldPacket& recv_data);
|
||||
void HandlePetRename(WorldPacket& recv_data);
|
||||
void HandlePetNameQuery(WorldPacket& recvData);
|
||||
void HandlePetSetAction(WorldPacket& recvData);
|
||||
void HandlePetAbandon(WorldPacket& recvData);
|
||||
void HandlePetRename(WorldPacket& recvData);
|
||||
void HandlePetCancelAuraOpcode(WorldPacket& recvPacket);
|
||||
void HandlePetSpellAutocastOpcode(WorldPacket& recvPacket);
|
||||
void HandlePetCastSpellOpcode(WorldPacket& recvPacket);
|
||||
void HandlePetLearnTalent(WorldPacket& recvPacket);
|
||||
void HandleLearnPreviewTalentsPet(WorldPacket& recvPacket);
|
||||
|
||||
void HandleSetActionBarToggles(WorldPacket& recv_data);
|
||||
void HandleSetActionBarToggles(WorldPacket& recvData);
|
||||
|
||||
void HandleCharRenameOpcode(WorldPacket& recv_data);
|
||||
void HandleCharRenameOpcode(WorldPacket& recvData);
|
||||
void HandleChangePlayerNameOpcodeCallBack(PreparedQueryResult result, std::string const& newName);
|
||||
void HandleSetPlayerDeclinedNames(WorldPacket& recv_data);
|
||||
void HandleSetPlayerDeclinedNames(WorldPacket& recvData);
|
||||
|
||||
void HandleTotemDestroyed(WorldPacket& recv_data);
|
||||
void HandleDismissCritter(WorldPacket& recv_data);
|
||||
void HandleTotemDestroyed(WorldPacket& recvData);
|
||||
void HandleDismissCritter(WorldPacket& recvData);
|
||||
|
||||
//Battleground
|
||||
void HandleBattlemasterHelloOpcode(WorldPacket& recv_data);
|
||||
void HandleBattlemasterJoinOpcode(WorldPacket& recv_data);
|
||||
void HandleBattlegroundPlayerPositionsOpcode(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 HandleBattlemasterHelloOpcode(WorldPacket& recvData);
|
||||
void HandleBattlemasterJoinOpcode(WorldPacket& recvData);
|
||||
void HandleBattlegroundPlayerPositionsOpcode(WorldPacket& recvData);
|
||||
void HandlePVPLogDataOpcode(WorldPacket& recvData);
|
||||
void HandleBattleFieldPortOpcode(WorldPacket& recvData);
|
||||
void HandleBattlefieldListOpcode(WorldPacket& recvData);
|
||||
void HandleLeaveBattlefieldOpcode(WorldPacket& recvData);
|
||||
void HandleBattlemasterJoinArena(WorldPacket& recvData);
|
||||
void HandleReportPvPAFK(WorldPacket& recvData);
|
||||
|
||||
void HandleWardenDataOpcode(WorldPacket& recv_data);
|
||||
void HandleWorldTeleportOpcode(WorldPacket& recv_data);
|
||||
void HandleMinimapPingOpcode(WorldPacket& recv_data);
|
||||
void HandleRandomRollOpcode(WorldPacket& recv_data);
|
||||
void HandleFarSightOpcode(WorldPacket& recv_data);
|
||||
void HandleSetDungeonDifficultyOpcode(WorldPacket& recv_data);
|
||||
void HandleSetRaidDifficultyOpcode(WorldPacket& recv_data);
|
||||
void HandleMoveSetCanFlyAckOpcode(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);
|
||||
void HandleHearthAndResurrect(WorldPacket& recv_data);
|
||||
void HandleWardenDataOpcode(WorldPacket& recvData);
|
||||
void HandleWorldTeleportOpcode(WorldPacket& recvData);
|
||||
void HandleMinimapPingOpcode(WorldPacket& recvData);
|
||||
void HandleRandomRollOpcode(WorldPacket& recvData);
|
||||
void HandleFarSightOpcode(WorldPacket& recvData);
|
||||
void HandleSetDungeonDifficultyOpcode(WorldPacket& recvData);
|
||||
void HandleSetRaidDifficultyOpcode(WorldPacket& recvData);
|
||||
void HandleMoveSetCanFlyAckOpcode(WorldPacket& recvData);
|
||||
void HandleSetTitleOpcode(WorldPacket& recvData);
|
||||
void HandleRealmSplitOpcode(WorldPacket& recvData);
|
||||
void HandleTimeSyncResp(WorldPacket& recvData);
|
||||
void HandleWhoisOpcode(WorldPacket& recvData);
|
||||
void HandleResetInstancesOpcode(WorldPacket& recvData);
|
||||
void HandleHearthAndResurrect(WorldPacket& recvData);
|
||||
void HandleInstanceLockResponse(WorldPacket& recvPacket);
|
||||
|
||||
// Battlefield
|
||||
@@ -803,23 +803,23 @@ class WorldSession
|
||||
void SendBfQueueInviteResponse(uint32 BattleId,uint32 ZoneId, bool CanQueue = true, bool Full = false);
|
||||
void SendBfEntered(uint32 BattleId);
|
||||
void SendBfLeaveMessage(uint32 BattleId, BFLeaveReason reason = BF_LEAVE_REASON_EXITED);
|
||||
void HandleBfQueueInviteResponse(WorldPacket &recv_data);
|
||||
void HandleBfEntryInviteResponse(WorldPacket &recv_data);
|
||||
void HandleBfExitRequest(WorldPacket &recv_data);
|
||||
void HandleBfQueueInviteResponse(WorldPacket &recvData);
|
||||
void HandleBfEntryInviteResponse(WorldPacket &recvData);
|
||||
void HandleBfExitRequest(WorldPacket &recvData);
|
||||
|
||||
// Looking for Dungeon/Raid
|
||||
void HandleLfgSetCommentOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgPartyLockInfoRequestOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgJoinOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgLeaveOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgSetRolesOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgProposalResultOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgSetBootVoteOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgTeleportOpcode(WorldPacket& recv_data);
|
||||
void HandleLfrJoinOpcode(WorldPacket& recv_data);
|
||||
void HandleLfrLeaveOpcode(WorldPacket& recv_data);
|
||||
void HandleLfgGetStatus(WorldPacket& recv_data);
|
||||
void HandleLfgSetCommentOpcode(WorldPacket& recvData);
|
||||
void HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& recvData);
|
||||
void HandleLfgPartyLockInfoRequestOpcode(WorldPacket& recvData);
|
||||
void HandleLfgJoinOpcode(WorldPacket& recvData);
|
||||
void HandleLfgLeaveOpcode(WorldPacket& recvData);
|
||||
void HandleLfgSetRolesOpcode(WorldPacket& recvData);
|
||||
void HandleLfgProposalResultOpcode(WorldPacket& recvData);
|
||||
void HandleLfgSetBootVoteOpcode(WorldPacket& recvData);
|
||||
void HandleLfgTeleportOpcode(WorldPacket& recvData);
|
||||
void HandleLfrJoinOpcode(WorldPacket& recvData);
|
||||
void HandleLfrLeaveOpcode(WorldPacket& recvData);
|
||||
void HandleLfgGetStatus(WorldPacket& recvData);
|
||||
|
||||
void SendLfgUpdatePlayer(const LfgUpdateData& updateData);
|
||||
void SendLfgUpdateParty(const LfgUpdateData& updateData);
|
||||
@@ -836,55 +836,55 @@ class WorldSession
|
||||
void SendLfgTeleportError(uint8 err);
|
||||
|
||||
// Arena Team
|
||||
void HandleInspectArenaTeamsOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamQueryOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamRosterOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamInviteOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamAcceptOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamDeclineOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamLeaveOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamRemoveOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamDisbandOpcode(WorldPacket& recv_data);
|
||||
void HandleArenaTeamLeaderOpcode(WorldPacket& recv_data);
|
||||
void HandleInspectArenaTeamsOpcode(WorldPacket& recvData);
|
||||
void HandleArenaTeamQueryOpcode(WorldPacket& recvData);
|
||||
void HandleArenaTeamRosterOpcode(WorldPacket& recvData);
|
||||
void HandleArenaTeamInviteOpcode(WorldPacket& recvData);
|
||||
void HandleArenaTeamAcceptOpcode(WorldPacket& recvData);
|
||||
void HandleArenaTeamDeclineOpcode(WorldPacket& recvData);
|
||||
void HandleArenaTeamLeaveOpcode(WorldPacket& recvData);
|
||||
void HandleArenaTeamRemoveOpcode(WorldPacket& recvData);
|
||||
void HandleArenaTeamDisbandOpcode(WorldPacket& recvData);
|
||||
void HandleArenaTeamLeaderOpcode(WorldPacket& recvData);
|
||||
|
||||
void HandleAreaSpiritHealerQueryOpcode(WorldPacket& recv_data);
|
||||
void HandleAreaSpiritHealerQueueOpcode(WorldPacket& recv_data);
|
||||
void HandleCancelMountAuraOpcode(WorldPacket& recv_data);
|
||||
void HandleSelfResOpcode(WorldPacket& recv_data);
|
||||
void HandleComplainOpcode(WorldPacket& recv_data);
|
||||
void HandleRequestPetInfoOpcode(WorldPacket& recv_data);
|
||||
void HandleAreaSpiritHealerQueryOpcode(WorldPacket& recvData);
|
||||
void HandleAreaSpiritHealerQueueOpcode(WorldPacket& recvData);
|
||||
void HandleCancelMountAuraOpcode(WorldPacket& recvData);
|
||||
void HandleSelfResOpcode(WorldPacket& recvData);
|
||||
void HandleComplainOpcode(WorldPacket& recvData);
|
||||
void HandleRequestPetInfoOpcode(WorldPacket& recvData);
|
||||
|
||||
// Socket gem
|
||||
void HandleSocketOpcode(WorldPacket& recv_data);
|
||||
void HandleSocketOpcode(WorldPacket& recvData);
|
||||
|
||||
void HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data);
|
||||
void HandleCancelTempEnchantmentOpcode(WorldPacket& recvData);
|
||||
|
||||
void HandleItemRefundInfoRequest(WorldPacket& recv_data);
|
||||
void HandleItemRefund(WorldPacket& recv_data);
|
||||
void HandleItemRefundInfoRequest(WorldPacket& recvData);
|
||||
void HandleItemRefund(WorldPacket& recvData);
|
||||
|
||||
void HandleChannelVoiceOnOpcode(WorldPacket& recv_data);
|
||||
void HandleVoiceSessionEnableOpcode(WorldPacket& recv_data);
|
||||
void HandleSetActiveVoiceChannel(WorldPacket& recv_data);
|
||||
void HandleSetTaxiBenchmarkOpcode(WorldPacket& recv_data);
|
||||
void HandleChannelVoiceOnOpcode(WorldPacket& recvData);
|
||||
void HandleVoiceSessionEnableOpcode(WorldPacket& recvData);
|
||||
void HandleSetActiveVoiceChannel(WorldPacket& recvData);
|
||||
void HandleSetTaxiBenchmarkOpcode(WorldPacket& recvData);
|
||||
|
||||
// Guild Bank
|
||||
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 HandleGuildPermissions(WorldPacket& recvData);
|
||||
void HandleGuildBankMoneyWithdrawn(WorldPacket& recvData);
|
||||
void HandleGuildBankerActivate(WorldPacket& recvData);
|
||||
void HandleGuildBankQueryTab(WorldPacket& recvData);
|
||||
void HandleGuildBankLogQuery(WorldPacket& recvData);
|
||||
void HandleGuildBankDepositMoney(WorldPacket& recvData);
|
||||
void HandleGuildBankWithdrawMoney(WorldPacket& recvData);
|
||||
void HandleGuildBankSwapItems(WorldPacket& recvData);
|
||||
|
||||
void HandleGuildBankUpdateTab(WorldPacket& recv_data);
|
||||
void HandleGuildBankBuyTab(WorldPacket& recv_data);
|
||||
void HandleQueryGuildBankTabText(WorldPacket& recv_data);
|
||||
void HandleSetGuildBankTabText(WorldPacket& recv_data);
|
||||
void HandleGuildBankUpdateTab(WorldPacket& recvData);
|
||||
void HandleGuildBankBuyTab(WorldPacket& recvData);
|
||||
void HandleQueryGuildBankTabText(WorldPacket& recvData);
|
||||
void HandleSetGuildBankTabText(WorldPacket& recvData);
|
||||
|
||||
// Refer-a-Friend
|
||||
void HandleGrantLevel(WorldPacket& recv_data);
|
||||
void HandleAcceptGrantLevel(WorldPacket& recv_data);
|
||||
void HandleGrantLevel(WorldPacket& recvData);
|
||||
void HandleAcceptGrantLevel(WorldPacket& recvData);
|
||||
|
||||
// Calendar
|
||||
void HandleCalendarGetCalendar(WorldPacket& recvData);
|
||||
@@ -918,19 +918,19 @@ class WorldSession
|
||||
void SendCalendarRaidLockoutUpdated(InstanceSave const* save);
|
||||
void SendCalendarCommandResult(CalendarError err, char const* param = NULL);
|
||||
|
||||
void HandleSpellClick(WorldPacket& recv_data);
|
||||
void HandleMirrorImageDataRequest(WorldPacket& recv_data);
|
||||
void HandleAlterAppearance(WorldPacket& recv_data);
|
||||
void HandleRemoveGlyph(WorldPacket& recv_data);
|
||||
void HandleCharCustomize(WorldPacket& recv_data);
|
||||
void HandleQueryInspectAchievements(WorldPacket& recv_data);
|
||||
void HandleEquipmentSetSave(WorldPacket& recv_data);
|
||||
void HandleEquipmentSetDelete(WorldPacket& recv_data);
|
||||
void HandleEquipmentSetUse(WorldPacket& recv_data);
|
||||
void HandleWorldStateUITimerUpdate(WorldPacket& recv_data);
|
||||
void HandleReadyForAccountDataTimes(WorldPacket& recv_data);
|
||||
void HandleQueryQuestsCompleted(WorldPacket& recv_data);
|
||||
void HandleQuestPOIQuery(WorldPacket& recv_data);
|
||||
void HandleSpellClick(WorldPacket& recvData);
|
||||
void HandleMirrorImageDataRequest(WorldPacket& recvData);
|
||||
void HandleAlterAppearance(WorldPacket& recvData);
|
||||
void HandleRemoveGlyph(WorldPacket& recvData);
|
||||
void HandleCharCustomize(WorldPacket& recvData);
|
||||
void HandleQueryInspectAchievements(WorldPacket& recvData);
|
||||
void HandleEquipmentSetSave(WorldPacket& recvData);
|
||||
void HandleEquipmentSetDelete(WorldPacket& recvData);
|
||||
void HandleEquipmentSetUse(WorldPacket& recvData);
|
||||
void HandleWorldStateUITimerUpdate(WorldPacket& recvData);
|
||||
void HandleReadyForAccountDataTimes(WorldPacket& recvData);
|
||||
void HandleQueryQuestsCompleted(WorldPacket& recvData);
|
||||
void HandleQuestPOIQuery(WorldPacket& recvData);
|
||||
void HandleEjectPassenger(WorldPacket& data);
|
||||
void HandleEnterPlayerVehicle(WorldPacket& data);
|
||||
void HandleUpdateProjectilePosition(WorldPacket& recvPacket);
|
||||
|
||||
@@ -980,6 +980,13 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_int_configs[CONFIG_RANDOM_BG_RESET_HOUR] = 6;
|
||||
}
|
||||
|
||||
m_int_configs[CONFIG_GUILD_RESET_HOUR] = ConfigMgr::GetIntDefault("Guild.ResetHour", 6);
|
||||
if (m_int_configs[CONFIG_GUILD_RESET_HOUR] > 23)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_GENERAL, "Guild.ResetHour (%i) can't be load. Set to 6.", m_int_configs[CONFIG_GUILD_RESET_HOUR]);
|
||||
m_int_configs[CONFIG_GUILD_RESET_HOUR] = 6;
|
||||
}
|
||||
|
||||
m_bool_configs[CONFIG_DETECT_POS_COLLISION] = ConfigMgr::GetBoolDefault("DetectPosCollision", true);
|
||||
|
||||
m_bool_configs[CONFIG_RESTRICTED_LFG_CHANNEL] = ConfigMgr::GetBoolDefault("Channel.RestrictedLfg", true);
|
||||
@@ -1771,6 +1778,9 @@ void World::SetInitialWorldSettings()
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Calculate random battleground reset time...");
|
||||
InitRandomBGResetTime();
|
||||
|
||||
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Calculate Guild cap reset time...");
|
||||
InitGuildResetTime();
|
||||
|
||||
LoadCharacterNameData();
|
||||
|
||||
uint32 startupDuration = GetMSTimeDiffToNow(startupBegin);
|
||||
@@ -1926,6 +1936,9 @@ void World::Update(uint32 diff)
|
||||
if (m_gameTime > m_NextRandomBGReset)
|
||||
ResetRandomBG();
|
||||
|
||||
if (m_gameTime > m_NextGuildReset)
|
||||
ResetGuildCap();
|
||||
|
||||
/// <ul><li> Handle auctions when the timer has passed
|
||||
if (m_timers[WUPDATE_AUCTIONS].Passed())
|
||||
{
|
||||
@@ -2736,6 +2749,33 @@ void World::InitRandomBGResetTime()
|
||||
sWorld->setWorldState(WS_BG_DAILY_RESET_TIME, uint64(m_NextRandomBGReset));
|
||||
}
|
||||
|
||||
void World::InitGuildResetTime()
|
||||
{
|
||||
time_t gtime = uint64(getWorldState(WS_GUILD_DAILY_RESET_TIME));
|
||||
if (!gtime)
|
||||
m_NextGuildReset = time_t(time(NULL)); // game time not yet init
|
||||
|
||||
// generate time by config
|
||||
time_t curTime = time(NULL);
|
||||
tm localTm = *localtime(&curTime);
|
||||
localTm.tm_hour = getIntConfig(CONFIG_GUILD_RESET_HOUR);
|
||||
localTm.tm_min = 0;
|
||||
localTm.tm_sec = 0;
|
||||
|
||||
// current day reset time
|
||||
time_t nextDayResetTime = mktime(&localTm);
|
||||
|
||||
// next reset time before current moment
|
||||
if (curTime >= nextDayResetTime)
|
||||
nextDayResetTime += DAY;
|
||||
|
||||
// normalize reset time
|
||||
m_NextGuildReset = gtime < curTime ? nextDayResetTime - DAY : nextDayResetTime;
|
||||
|
||||
if (!gtime)
|
||||
sWorld->setWorldState(WS_GUILD_DAILY_RESET_TIME, uint64(m_NextGuildReset));
|
||||
}
|
||||
|
||||
void World::ResetDailyQuests()
|
||||
{
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Daily quests reset for all characters.");
|
||||
@@ -2812,6 +2852,15 @@ void World::ResetRandomBG()
|
||||
sWorld->setWorldState(WS_BG_DAILY_RESET_TIME, uint64(m_NextRandomBGReset));
|
||||
}
|
||||
|
||||
void World::ResetGuildCap()
|
||||
{
|
||||
sLog->outInfo(LOG_FILTER_GENERAL, "Guild Daily Cap reset.");
|
||||
|
||||
m_NextGuildReset = time_t(m_NextGuildReset + DAY);
|
||||
sWorld->setWorldState(WS_GUILD_DAILY_RESET_TIME, uint64(m_NextGuildReset));
|
||||
sGuildMgr->ResetTimes();
|
||||
}
|
||||
|
||||
void World::UpdateMaxSessionCounters()
|
||||
{
|
||||
m_maxActiveSessionCount = std::max(m_maxActiveSessionCount, uint32(m_sessions.size()-m_QueuedPlayer.size()));
|
||||
|
||||
@@ -303,6 +303,7 @@ enum WorldIntConfigs
|
||||
CONFIG_GUILD_BANK_EVENT_LOG_COUNT,
|
||||
CONFIG_MIN_LEVEL_STAT_SAVE,
|
||||
CONFIG_RANDOM_BG_RESET_HOUR,
|
||||
CONFIG_GUILD_RESET_HOUR,
|
||||
CONFIG_CHARDELETE_KEEP_DAYS,
|
||||
CONFIG_CHARDELETE_METHOD,
|
||||
CONFIG_CHARDELETE_MIN_LEVEL,
|
||||
@@ -468,8 +469,9 @@ enum RealmZone
|
||||
|
||||
enum WorldStates
|
||||
{
|
||||
WS_WEEKLY_QUEST_RESET_TIME = 20002, // Next weekly reset time
|
||||
WS_BG_DAILY_RESET_TIME = 20003 // Next daily BG reset time
|
||||
WS_WEEKLY_QUEST_RESET_TIME = 20002, // Next weekly reset time
|
||||
WS_BG_DAILY_RESET_TIME = 20003, // Next daily BG reset time
|
||||
WS_GUILD_DAILY_RESET_TIME = 20006, // Next guild cap reset time
|
||||
};
|
||||
|
||||
// DB scripting commands
|
||||
@@ -776,9 +778,11 @@ class World
|
||||
void InitDailyQuestResetTime();
|
||||
void InitWeeklyQuestResetTime();
|
||||
void InitRandomBGResetTime();
|
||||
void InitGuildResetTime();
|
||||
void ResetDailyQuests();
|
||||
void ResetWeeklyQuests();
|
||||
void ResetRandomBG();
|
||||
void ResetGuildCap();
|
||||
private:
|
||||
static ACE_Atomic_Op<ACE_Thread_Mutex, bool> m_stopEvent;
|
||||
static uint8 m_ExitCode;
|
||||
@@ -839,6 +843,7 @@ class World
|
||||
time_t m_NextDailyQuestReset;
|
||||
time_t m_NextWeeklyQuestReset;
|
||||
time_t m_NextRandomBGReset;
|
||||
time_t m_NextGuildReset;
|
||||
|
||||
//Player Queue
|
||||
Queue m_QueuedPlayer;
|
||||
|
||||
@@ -169,10 +169,9 @@ void CharacterDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_STATEMENT(CHAR_INS_GUILD_BANK_ITEM, "INSERT INTO guild_bank_item (guildid, TabId, SlotId, item_guid) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_ITEM, "DELETE FROM guild_bank_item WHERE guildid = ? AND TabId = ? AND SlotId = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint8
|
||||
PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_ITEMS, "DELETE FROM guild_bank_item WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32
|
||||
PREPARE_STATEMENT(CHAR_INS_GUILD_BANK_RIGHT_DEFAULT, "INSERT INTO guild_bank_right (guildid, TabId, rid) VALUES (?, ?, ?)", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint8
|
||||
// 0: uint32, 1: uint8, 2: uint8, 3: uint8, 4: uint32
|
||||
PREPARE_STATEMENT(CHAR_INS_GUILD_BANK_RIGHT, "INSERT INTO guild_bank_right (guildid, TabId, rid, gbright, SlotPerDay) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_RIGHT, "DELETE FROM guild_bank_right WHERE guildid = ? AND TabId = ? AND rid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint8
|
||||
PREPARE_STATEMENT(CHAR_INS_GUILD_BANK_RIGHT, "INSERT INTO guild_bank_right (guildid, TabId, rid, gbright, SlotPerDay) VALUES (?, ?, ?, ?, ?) "
|
||||
"ON DUPLICATE KEY UPDATE gbright = VALUES(gbright), SlotPerDay = VALUES(SlotPerDay)", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_RIGHTS, "DELETE FROM guild_bank_right WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint32
|
||||
PREPARE_STATEMENT(CHAR_DEL_GUILD_BANK_RIGHTS_FOR_RANK, "DELETE FROM guild_bank_right WHERE guildid = ? AND rid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8
|
||||
// 0-1: uint32, 2-3: uint8, 4-5: uint32, 6: uint16, 7: uint8, 8: uint64
|
||||
@@ -198,32 +197,15 @@ void CharacterDatabaseConnection::DoPrepareStatements()
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_BANK_MONEY, "UPDATE guild SET BankMoney = ? WHERE guildid = ?", CONNECTION_ASYNC) // 0: uint64, 1: uint32
|
||||
// 0: uint8, 1: uint32, 2: uint8, 3: uint32
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_BANK_EVENTLOG_TAB, "UPDATE guild_bank_eventlog SET TabId = ? WHERE guildid = ? AND TabId = ? AND LogGuid = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_MONEY, "UPDATE guild_member SET BankRemMoney = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint32, 2: uint32
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_MONEY, "UPDATE guild_member SET BankResetTimeMoney = ?, BankRemMoney = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint32, 2: uint32, 3: uint32
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_RESET_TIME, "UPDATE guild_member SET BankResetTimeMoney = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_MONEY, "UPDATE guild_rank SET BankMoneyPerDay = ? WHERE rid = ? AND guildid = ?", CONNECTION_ASYNC) // 0: uint32, 1: uint8, 2: uint32
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_BANK_TAB_TEXT, "UPDATE guild_bank_tab SET TabText = ? WHERE guildid = ? AND TabId = ?", CONNECTION_ASYNC) // 0: string, 1: uint32, 2: uint8
|
||||
|
||||
PREPARE_STATEMENT(CHAR_INS_GUILD_MEMBER_WITHDRAW,
|
||||
"INSERT INTO guild_member_withdraw (guid, tab0, tab1, tab2, tab3, tab4, tab5, money) VALUES (?, ?, ?, ?, ?, ?, ?, ?) "
|
||||
"ON DUPLICATE KEY UPDATE tab0 = VALUES (tab0), tab1 = VALUES (tab1), tab2 = VALUES (tab2), tab3 = VALUES (tab3), tab4 = VALUES (tab4), tab5 = VALUES (tab5)", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_DEL_GUILD_MEMBER_WITHDRAW, "TRUNCATE guild_member_withdraw", CONNECTION_ASYNC)
|
||||
|
||||
// 0: uint32, 1: uint32, 2: uint32
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS0, "UPDATE guild_member SET BankRemSlotsTab0 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS1, "UPDATE guild_member SET BankRemSlotsTab1 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS2, "UPDATE guild_member SET BankRemSlotsTab2 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS3, "UPDATE guild_member SET BankRemSlotsTab3 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS4, "UPDATE guild_member SET BankRemSlotsTab4 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS5, "UPDATE guild_member SET BankRemSlotsTab5 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
// 0: uint32, 1: uint32, 2: uint32, 3: uint32
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS0, "UPDATE guild_member SET BankResetTimeTab0 = ?, BankRemSlotsTab0 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS1, "UPDATE guild_member SET BankResetTimeTab1 = ?, BankRemSlotsTab1 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS2, "UPDATE guild_member SET BankResetTimeTab2 = ?, BankRemSlotsTab2 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS3, "UPDATE guild_member SET BankResetTimeTab3 = ?, BankRemSlotsTab3 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS4, "UPDATE guild_member SET BankResetTimeTab4 = ?, BankRemSlotsTab4 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS5, "UPDATE guild_member SET BankResetTimeTab5 = ?, BankRemSlotsTab5 = ? WHERE guildid = ? AND guid = ?", CONNECTION_ASYNC)
|
||||
// 0: uint32, 1: uint8
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME0, "UPDATE guild_member SET BankResetTimeTab0 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME1, "UPDATE guild_member SET BankResetTimeTab1 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME2, "UPDATE guild_member SET BankResetTimeTab2 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME3, "UPDATE guild_member SET BankResetTimeTab3 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME4, "UPDATE guild_member SET BankResetTimeTab4 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_UPD_GUILD_RANK_BANK_TIME5, "UPDATE guild_member SET BankResetTimeTab5 = 0 WHERE guildid = ? AND rank = ?", CONNECTION_ASYNC)
|
||||
PREPARE_STATEMENT(CHAR_SEL_CHAR_DATA_FOR_GUILD, "SELECT name, level, class, zone, account FROM characters WHERE guid = ?", CONNECTION_SYNCH)
|
||||
|
||||
// Chat channel handling
|
||||
|
||||
@@ -173,9 +173,7 @@ enum CharacterDatabaseStatements
|
||||
CHAR_INS_GUILD_BANK_ITEM,
|
||||
CHAR_DEL_GUILD_BANK_ITEM,
|
||||
CHAR_DEL_GUILD_BANK_ITEMS,
|
||||
CHAR_INS_GUILD_BANK_RIGHT_DEFAULT,
|
||||
CHAR_INS_GUILD_BANK_RIGHT,
|
||||
CHAR_DEL_GUILD_BANK_RIGHT,
|
||||
CHAR_DEL_GUILD_BANK_RIGHTS,
|
||||
CHAR_DEL_GUILD_BANK_RIGHTS_FOR_RANK,
|
||||
CHAR_INS_GUILD_BANK_EVENTLOG,
|
||||
@@ -196,29 +194,10 @@ enum CharacterDatabaseStatements
|
||||
CHAR_UPD_GUILD_BANK_TAB_INFO,
|
||||
CHAR_UPD_GUILD_BANK_MONEY,
|
||||
CHAR_UPD_GUILD_BANK_EVENTLOG_TAB,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_REM_MONEY,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_TIME_MONEY,
|
||||
CHAR_UPD_GUILD_RANK_BANK_RESET_TIME,
|
||||
CHAR_UPD_GUILD_RANK_BANK_MONEY,
|
||||
CHAR_UPD_GUILD_BANK_TAB_TEXT,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS0,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS1,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS2,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS3,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS4,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_TIME_REM_SLOTS5,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS0,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS1,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS2,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS3,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS4,
|
||||
CHAR_UPD_GUILD_MEMBER_BANK_REM_SLOTS5,
|
||||
CHAR_UPD_GUILD_RANK_BANK_TIME0,
|
||||
CHAR_UPD_GUILD_RANK_BANK_TIME1,
|
||||
CHAR_UPD_GUILD_RANK_BANK_TIME2,
|
||||
CHAR_UPD_GUILD_RANK_BANK_TIME3,
|
||||
CHAR_UPD_GUILD_RANK_BANK_TIME4,
|
||||
CHAR_UPD_GUILD_RANK_BANK_TIME5,
|
||||
CHAR_INS_GUILD_MEMBER_WITHDRAW,
|
||||
CHAR_DEL_GUILD_MEMBER_WITHDRAW,
|
||||
CHAR_SEL_CHAR_DATA_FOR_GUILD,
|
||||
|
||||
CHAR_SEL_CHANNEL,
|
||||
|
||||
@@ -975,6 +975,14 @@ Quests.IgnoreAutoComplete = 0
|
||||
|
||||
Guild.EventLogRecordsCount = 100
|
||||
|
||||
#
|
||||
# Guild.ResetHour
|
||||
# Description: Hour of the day when the daily cap resets occur.
|
||||
# Range: 0-23
|
||||
# Default: 6 - (06:00 AM)
|
||||
|
||||
Guild.ResetHour = 6
|
||||
|
||||
#
|
||||
# Guild.BankEventLogRecordsCount
|
||||
# Description: Number of log entries for guild bank events that are stored per guild. Old
|
||||
|
||||
Reference in New Issue
Block a user