TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
WorldSession.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
3  * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License as published by the
7  * Free Software Foundation; either version 2 of the License, or (at your
8  * option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
22 
23 #ifndef __WORLDSESSION_H
24 #define __WORLDSESSION_H
25 
26 #include "Common.h"
27 #include "SharedDefines.h"
28 #include "AddonMgr.h"
29 #include "DatabaseEnv.h"
30 #include "World.h"
31 #include "Packet.h"
32 #include "Cryptography/BigNumber.h"
33 #include "AccountMgr.h"
34 #include <unordered_set>
35 
36 class BattlePetMgr;
37 class Channel;
38 class CollectionMgr;
39 class Creature;
40 class GameObject;
41 class InstanceSave;
42 class Item;
43 class LoginQueryHolder;
44 class Object;
45 class Player;
46 class Quest;
47 class SpellCastTargets;
48 class Unit;
49 class Warden;
50 class WorldPacket;
51 class WorldSession;
52 class WorldSocket;
53 struct AreaTableEntry;
54 struct AuctionEntry;
55 struct DeclinedName;
56 struct ItemTemplate;
57 struct MovementInfo;
58 
59 namespace lfg
60 {
61 struct LfgJoinResultData;
62 struct LfgPlayerBoot;
63 struct LfgProposal;
64 struct LfgQueueStatusData;
65 struct LfgPlayerRewardData;
66 struct LfgRoleCheck;
67 struct LfgUpdateData;
68 }
69 
70 namespace rbac
71 {
72 class RBACData;
73 }
74 
75 namespace WorldPackets
76 {
77  namespace Achievement
78  {
79  class GuildSetFocusedAchievement;
80  }
81 
82  namespace AuctionHouse
83  {
84  class AuctionHelloRequest;
85  class AuctionListBidderItems;
86  class AuctionListItems;
87  class AuctionListOwnerItems;
88  class AuctionListPendingSales;
89  class AuctionPlaceBid;
90  class AuctionRemoveItem;
91  class AuctionReplicateItems;
92  class AuctionSellItem;
93  }
94 
95  namespace Auth
96  {
97  enum class ConnectToSerial : uint32;
98  }
99 
100  namespace Bank
101  {
102  class AutoBankItem;
103  class AutoStoreBankItem;
104  class BuyBankSlot;
105  }
106 
107  namespace Battlefield
108  {
109  class BFMgrEntryInviteResponse;
110  class BFMgrQueueInviteResponse;
111  class BFMgrQueueExitRequest;
112  }
113 
114  namespace Battleground
115  {
116  class AreaSpiritHealerQuery;
117  class AreaSpiritHealerQueue;
118  class HearthAndResurrect;
119  class PVPLogDataRequest;
120  class BattlemasterJoin;
121  class BattlemasterJoinArena;
122  class BattlefieldLeave;
123  class BattlefieldPort;
124  class BattlefieldListRequest;
125  class GetPVPOptionsEnabled;
126  class RequestBattlefieldStatus;
127  class ReportPvPPlayerAFK;
128  class RequestPVPRewards;
129  class RequestRatedBattlefieldInfo;
130  }
131 
132  namespace Battlenet
133  {
134  class Request;
135  class RequestRealmListTicket;
136  }
137 
138  namespace BattlePet
139  {
140  class BattlePetRequestJournal;
141  class BattlePetSetBattleSlot;
142  class BattlePetModifyName;
143  class BattlePetDeletePet;
144  class BattlePetSetFlags;
145  class BattlePetSummon;
146  class CageBattlePet;
147  }
148 
149  namespace BlackMarket
150  {
151  class BlackMarketOpen;
152  }
153 
154  namespace Calendar
155  {
156  class CalendarAddEvent;
157  class CalendarCopyEvent;
158  class CalendarEventInvite;
159  class CalendarEventModeratorStatus;
160  class CalendarEventRSVP;
161  class CalendarEventSignUp;
162  class CalendarEventStatus;
163  class CalendarGetCalendar;
164  class CalendarGetEvent;
165  class CalendarGetNumPending;
166  class CalendarGuildFilter;
167  class CalendarRemoveEvent;
168  class CalendarRemoveInvite;
169  class CalendarUpdateEvent;
170  class SetSavedInstanceExtend;
171  class CalendarComplain;
172  }
173 
174  namespace Character
175  {
176  struct CharacterCreateInfo;
177  struct CharacterRenameInfo;
178  struct CharCustomizeInfo;
179  struct CharRaceOrFactionChangeInfo;
180  struct CharacterUndeleteInfo;
181 
182  class AlterApperance;
183  class EnumCharacters;
184  class CreateCharacter;
185  class CharDelete;
186  class CharacterRenameRequest;
187  class CharCustomize;
188  class CharRaceOrFactionChange;
189  class GenerateRandomCharacterName;
190  class GetUndeleteCharacterCooldownStatus;
191  class ReorderCharacters;
192  class UndeleteCharacter;
193  class PlayerLogin;
194  class LogoutRequest;
195  class LogoutCancel;
196  class LoadingScreenNotify;
197  class SetActionBarToggles;
198  class RequestPlayedTime;
199  class ShowingCloak;
200  class ShowingHelm;
201  class SetTitle;
202  class SetFactionAtWar;
203  class SetFactionNotAtWar;
204  class SetFactionInactive;
205  class SetWatchedFaction;
206  class SetPlayerDeclinedNames;
207 
208  enum class LoginFailureReason : uint8;
209  }
210 
211  namespace ClientConfig
212  {
213  class RequestAccountData;
214  class UserClientUpdateAccountData;
215  class SetAdvancedCombatLogging;
216  }
217 
218  namespace Channel
219  {
220  class ChannelPlayerCommand;
221  class JoinChannel;
222  class LeaveChannel;
223  }
224 
225  namespace Chat
226  {
227  class ChatMessage;
228  class ChatMessageWhisper;
229  class ChatMessageChannel;
230  class ChatAddonMessage;
231  class ChatAddonMessageWhisper;
232  class ChatAddonMessageChannel;
233  class ChatMessageAFK;
234  class ChatMessageDND;
235  class ChatMessageEmote;
236  class CTextEmote;
237  class EmoteClient;
238  class ChatRegisterAddonPrefixes;
239  class ChatUnregisterAllAddonPrefixes;
240  class ChatReportIgnored;
241  }
242 
243  namespace Combat
244  {
245  class AttackSwing;
246  class AttackStop;
247  class SetSheathed;
248  }
249 
250  namespace Duel
251  {
252  class CanDuel;
253  class DuelResponse;
254  }
255 
256  namespace EquipmentSet
257  {
258  class SaveEquipmentSet;
259  class DeleteEquipmentSet;
260  class UseEquipmentSet;
261  }
262 
263  namespace GameObject
264  {
265  class GameObjReportUse;
266  class GameObjUse;
267  }
268 
269  namespace Garrison
270  {
271  class GetGarrisonInfo;
272  class GarrisonPurchaseBuilding;
273  class GarrisonCancelConstruction;
274  class GarrisonRequestBlueprintAndSpecializationData;
275  class GarrisonGetBuildingLandmarks;
276  }
277 
278  namespace Guild
279  {
280  class QueryGuildInfo;
281  class GuildInviteByName;
282  class AcceptGuildInvite;
283  class DeclineGuildInvites;
284  class GuildDeclineInvitation;
285  class GuildGetRoster;
286  class GuildPromoteMember;
287  class GuildDemoteMember;
288  class GuildOfficerRemoveMember;
289  class GuildAssignMemberRank;
290  class GuildLeave;
291  class GuildDelete;
292  class GuildUpdateMotdText;
293  class GuildGetRanks;
294  class GuildAddRank;
295  class GuildDeleteRank;
296  class GuildUpdateInfoText;
297  class GuildSetMemberNote;
298  class GuildEventLogQuery;
299  class GuildBankRemainingWithdrawMoneyQuery;
300  class GuildPermissionsQuery;
301  class GuildSetRankPermissions;
302  class GuildBankActivate;
303  class GuildBankQueryTab;
304  class GuildBankDepositMoney;
305  class GuildBankWithdrawMoney;
306  class GuildBankSwapItems;
307  class GuildBankBuyTab;
308  class GuildBankUpdateTab;
309  class GuildBankLogQuery;
310  class GuildBankTextQuery;
311  class GuildBankSetTabText;
312  class RequestGuildPartyState;
313  class RequestGuildRewardsList;
314  class GuildQueryNews;
315  class GuildNewsUpdateSticky;
316  class GuildSetGuildMaster;
317  class GuildChallengeUpdateRequest;
318  class SaveGuildEmblem;
319  class GuildSetAchievementTracking;
320  }
321 
322  namespace GuildFinder
323  {
324  class LFGuildAddRecruit;
325  class LFGuildBrowse;
326  class LFGuildDeclineRecruit;
327  class LFGuildGetApplications;
328  class LFGuildGetGuildPost;
329  class LFGuildGetRecruits;
330  class LFGuildRemoveRecruit;
331  class LFGuildSetGuildPost;
332  }
333 
334  namespace Inspect
335  {
336  class Inspect;
337  class InspectPVPRequest;
338  class QueryInspectAchievements;
339  class RequestHonorStats;
340  }
341 
342  namespace Instance
343  {
344  class InstanceInfo;
345  class InstanceLockResponse;
346  class ResetInstances;
347  }
348 
349  namespace Item
350  {
351  class AutoEquipItem;
352  class AutoEquipItemSlot;
353  class AutoStoreBagItem;
354  class BuyItem;
355  class BuyBackItem;
356  class DestroyItem;
357  class GetItemPurchaseData;
358  class ItemPurchaseRefund;
359  class RepairItem;
360  class ReadItem;
361  class SellItem;
362  class SplitItem;
363  class SwapInvItem;
364  class SwapItem;
365  class WrapItem;
366  class CancelTempEnchantment;
367  class TransmogrifyItems;
368  class UseCritterItem;
369  class SocketGems;
370  }
371 
372  namespace Loot
373  {
374  class LootUnit;
375  class LootItem;
376  class LootRelease;
377  class LootMoney;
378  class LootRoll;
379  class SetLootSpecialization;
380  }
381 
382  namespace Mail
383  {
384  class MailCreateTextItem;
385  class MailDelete;
386  class MailGetList;
387  class MailMarkAsRead;
388  class MailQueryNextMailTime;
389  class MailReturnToSender;
390  class MailTakeItem;
391  class MailTakeMoney;
392  class SendMail;
393  }
394 
395  namespace Misc
396  {
397  class AreaTrigger;
398  class SetSelection;
399  class ViolenceLevel;
400  class TimeSyncResponse;
401  class TutorialSetFlag;
402  class SetDungeonDifficulty;
403  class SetRaidDifficulty;
404  class PortGraveyard;
405  class ReclaimCorpse;
406  class RepopRequest;
407  class RequestCemeteryList;
408  class ResurrectResponse;
409  class StandStateChange;
410  class UITimeRequest;
411  class RandomRollClient;
412  class ObjectUpdateFailed;
413  class ObjectUpdateRescued;
414  class CompleteCinematic;
415  class NextCinematicCamera;
416  class FarSight;
417  class LoadCUFProfiles;
418  class SaveCUFProfiles;
419  class OpeningCinematic;
420  class TogglePvP;
421  class SetPvP;
422  class WorldTeleport;
423  class MountSpecial;
424  class SetTaxiBenchmarkMode;
425  }
426 
427  namespace Movement
428  {
429  class ClientPlayerMovement;
430  class WorldPortResponse;
431  class MoveTeleportAck;
432  class MovementAckMessage;
433  class MovementSpeedAck;
434  class SetActiveMover;
435  class MoveSetCollisionHeightAck;
436  class MoveTimeSkipped;
437  class SummonResponse;
438  class MoveSplineDone;
439  }
440 
441  namespace NPC
442  {
443  class Hello;
444  class GossipSelectOption;
445  class SpiritHealerActivate;
446  class TrainerBuySpell;
447  class RequestStabledPets;
448  }
449 
450  namespace Party
451  {
452  class PartyCommandResult;
453  class PartyInviteClient;
454  class PartyInvite;
455  class PartyInviteResponse;
456  class PartyUninvite;
457  class GroupDecline;
458  class RequestPartyMemberStats;
459  class PartyMemberStats;
460  class SetPartyLeader;
461  class SetPartyAssignment;
462  class SetRole;
463  class RoleChangedInform;
464  class SetLootMethod;
465  class LeaveGroup;
466  class MinimapPingClient;
467  class MinimapPing;
468  class UpdateRaidTarget;
469  class SendRaidTargetUpdateSingle;
470  class SendRaidTargetUpdateAll;
471  class ConvertRaid;
472  class RequestPartyJoinUpdates;
473  class SetAssistantLeader;
474  class DoReadyCheck;
475  class ReadyCheckStarted;
476  class ReadyCheckResponseClient;
477  class ReadyCheckResponse;
478  class ReadyCheckCompleted;
479  class RequestRaidInfo;
480  class OptOutOfLoot;
481  class InitiateRolePoll;
482  class RolePollInform;
483  class GroupNewLeader;
484  class PartyUpdate;
485  class SetEveryoneIsAssistant;
486  class ChangeSubGroup;
487  class SwapSubGroups;
488  class RaidMarkersChanged;
489  class ClearRaidMarker;
490  }
491 
492  namespace Pet
493  {
494  class DismissCritter;
495  class RequestPetInfo;
496  class PetAbandon;
497  class PetStopAttack;
498  class PetSpellAutocast;
499  class PetRename;
500  class PetAction;
501  class PetCancelAura;
502  class PetSetAction;
503  }
504 
505  namespace Petition
506  {
507  class DeclinePetition;
508  class OfferPetition;
509  class PetitionBuy;
510  class PetitionRenameGuild;
511  class PetitionShowList;
512  class PetitionShowSignatures;
513  class QueryPetition;
514  class SignPetition;
515  class TurnInPetition;
516  }
517 
518  namespace Query
519  {
520  class QueryCreature;
521  class QueryPlayerName;
522  class QueryPageText;
523  class QueryNPCText;
524  class DBQueryBulk;
525  class QueryGameObject;
526  class QueryCorpseLocationFromClient;
527  class QueryCorpseTransport;
528  class QueryTime;
529  class QueryPetName;
530  class QuestPOIQuery;
531  class QueryQuestCompletionNPCs;
532  class ItemTextQuery;
533  }
534 
535  namespace Quest
536  {
537  class QuestConfirmAccept;
538  class QuestGiverStatusQuery;
539  class QuestGiverStatusMultipleQuery;
540  class QuestGiverHello;
541  class QueryQuestInfo;
542  class QuestGiverChooseReward;
543  class QuestGiverCompleteQuest;
544  class QuestGiverRequestReward;
545  class QuestGiverQueryQuest;
546  class QuestGiverAcceptQuest;
547  class QuestLogRemoveQuest;
548  class QuestPushResult;
549  class PushQuestToParty;
550  }
551 
552  namespace RaF
553  {
554  class AcceptLevelGrant;
555  class GrantLevel;
556  }
557 
558  namespace Reputation
559  {
560  class RequestForcedReactions;
561  }
562 
563  namespace Toy
564  {
565  class AccountToysUpdate;
566  class AddToy;
567  class ToySetFavorite;
568  class UseToy;
569  }
570 
571  namespace Scenes
572  {
573  class SceneTriggerEvent;
574  class ScenePlaybackComplete;
575  class ScenePlaybackCanceled;
576  }
577 
578  namespace Social
579  {
580  class AddFriend;
581  class AddIgnore;
582  class DelFriend;
583  class DelIgnore;
584  class SendContactList;
585  class SetContactNotes;
586  }
587 
588  namespace Spells
589  {
590  class CancelAura;
591  class CancelAutoRepeatSpell;
592  class CancelChannelling;
593  class CancelGrowthAura;
594  class CancelMountAura;
595  class PetCancelAura;
596  class RequestCategoryCooldowns;
597  class CancelCast;
598  class CastSpell;
599  class PetCastSpell;
600  class UseItem;
601  class OpenItem;
602  class SetActionButton;
603  class UnlearnSkill;
604  class SelfRes;
605  class GetMirrorImageData;
606  class SpellClick;
607  class MissileTrajectoryCollision;
608  class UpdateMissileTrajectory;
609  }
610 
611  namespace Talent
612  {
613  class SetSpecialization;
614  class LearnTalents;
615  class ConfirmRespecWipe;
616  }
617 
618  namespace Taxi
619  {
620  class ShowTaxiNodes;
621  class TaxiNodeStatusQuery;
622  class EnableTaxiNode;
623  class TaxiQueryAvailableNodes;
624  class ActivateTaxi;
625  class TaxiRequestEarlyLanding;
626  }
627 
628  namespace Ticket
629  {
630  class GMTicketGetSystemStatus;
631  class GMTicketGetCaseStatus;
632  class SupportTicketSubmitBug;
633  class SupportTicketSubmitSuggestion;
634  class SupportTicketSubmitComplaint;
635  class BugReport;
636  class Complaint;
637  }
638 
639  namespace Token
640  {
641  class UpdateListedAuctionableTokens;
642  class RequestWowTokenMarketPrice;
643  }
644 
645  namespace Totem
646  {
647  class TotemDestroyed;
648  }
649 
650  namespace Trade
651  {
652  class AcceptTrade;
653  class BeginTrade;
654  class BusyTrade;
655  class CancelTrade;
656  class ClearTradeItem;
657  class IgnoreTrade;
658  class InitiateTrade;
659  class SetTradeCurrency;
660  class SetTradeGold;
661  class SetTradeItem;
662  class UnacceptTrade;
663  class TradeStatus;
664  }
665 
666  namespace Vehicle
667  {
668  class MoveDismissVehicle;
669  class RequestVehiclePrevSeat;
670  class RequestVehicleNextSeat;
671  class MoveChangeVehicleSeats;
672  class RequestVehicleSwitchSeat;
673  class RideVehicleInteract;
674  class EjectPassenger;
675  class RequestVehicleExit;
676  class MoveSetVehicleRecIdAck;
677  }
678 
679  namespace Voice
680  {
681  class VoiceSessionEnable;
682  class SetActiveVoiceChannel;
683  }
684 
685  namespace VoidStorage
686  {
687  class UnlockVoidStorage;
688  class QueryVoidStorage;
689  class VoidStorageTransfer;
690  class SwapVoidItem;
691  }
692 
693  namespace Warden
694  {
695  class WardenData;
696  }
697 
698  namespace Who
699  {
700  class WhoIsRequest;
701  class WhoRequestPkt;
702  }
703 
704  class Null final : public ClientPacket
705  {
706  public:
707  Null(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
708 
709  void Read() override { _worldPacket.rfinish(); }
710  };
711 }
712 
713 namespace google
714 {
715  namespace protobuf
716  {
717  class Message;
718  }
719 }
720 
721 namespace pb = google::protobuf;
722 
724 {
725  GLOBAL_CONFIG_CACHE = 0, // 0x01 g
727  GLOBAL_BINDINGS_CACHE = 2, // 0x04 g
729  GLOBAL_MACROS_CACHE = 4, // 0x10 g
733 };
734 
735 #define NUM_ACCOUNT_DATA_TYPES 8
736 
737 #define GLOBAL_CACHE_MASK 0x15
738 #define PER_CHARACTER_CACHE_MASK 0xEA
739 
741 {
745 };
746 
747 /*
748 enum Tutorials
749 {
750  TUTORIAL_TALENT = 0,
751  TUTORIAL_SPEC = 1,
752  TUTORIAL_GLYPH = 2,
753  TUTORIAL_SPELLBOOK = 3,
754  TUTORIAL_PROFESSIONS = 4,
755  TUTORIAL_CORE_ABILITITES = 5,
756  TUTORIAL_PET_JOURNAL = 6,
757  TUTORIAL_WHAT_HAS_CHANGED = 7,
758  TUTORIAL_GARRISON_BUILDING = 8,
759  TUTORIAL_GARRISON_MISSION_LIST = 9,
760  TUTORIAL_GARRISON_MISSION_PAGE = 10,
761  TUTORIAL_GARRISON_LANDING = 11,
762  TUTORIAL_GARRISON_ZONE_ABILITY = 12,
763  TUTORIAL_WORLD_MAP_FRAME = 13,
764  TUTORIAL_CLEAN_UP_BAGS = 14,
765  TUTORIAL_BAG_SETTINGS = 15,
766  TUTORIAL_REAGENT_BANK_UNLOCK = 16,
767  TUTORIAL_TOYBOX_FAVORITE = 17,
768  TUTORIAL_TOYBOX_MOUSEWHEEL_PAGING = 18,
769  TUTORIAL_LFG_LIST = 19
770 };
771 */
772 
773 #define MAX_ACCOUNT_TUTORIAL_VALUES 8
774 
776 {
777  time_t Time = 0;
778  std::string Data;
779 };
780 
782 {
787 };
788 
790 {
795 };
796 
798 {
800  //BF_LEAVE_REASON_UNK1 = 2, (not used)
801  //BF_LEAVE_REASON_UNK2 = 4, (not used)
806 };
807 
809 {
815 };
816 
818 {
823 };
824 
826 {
829 };
830 
831 #define DB2_REPLY_SPARSE 2442913102
832 #define DB2_REPLY_ITEM 1344507586
833 
834 //class to deal with packet processing
835 //allows to determine if next packet is safe to be processed
837 {
838 public:
839  explicit PacketFilter(WorldSession* pSession) : m_pSession(pSession) { }
840  virtual ~PacketFilter() { }
841 
842  virtual bool Process(WorldPacket* /*packet*/) = 0;
843  virtual bool ProcessUnsafe() const { return false; }
844 
845 protected:
847 
848 private:
849  PacketFilter(PacketFilter const& right) = delete;
850  PacketFilter& operator=(PacketFilter const& right) = delete;
851 };
852 
853 //process only thread-safe packets in Map::Update()
855 {
856 public:
857  explicit MapSessionFilter(WorldSession* pSession) : PacketFilter(pSession) { }
859 
860  bool Process(WorldPacket* packet) override;
861 };
862 
863 //class used to filer only thread-unsafe packets from queue
864 //in order to update only be used in World::UpdateSessions()
866 {
867 public:
868  explicit WorldSessionFilter(WorldSession* pSession) : PacketFilter(pSession) { }
870 
871  bool Process(WorldPacket* packet) override;
872  bool ProcessUnsafe() const override { return true; }
873 };
874 
876 {
879 };
880 
883 {
884  public:
885  WorldSession(uint32 id, std::string&& name, uint32 battlenetAccountId, std::shared_ptr<WorldSocket> sock, AccountTypes sec, uint8 expansion, time_t mute_time,
886  std::string os, LocaleConstant locale, uint32 recruiter, bool isARecruiter);
887  ~WorldSession();
888 
889  bool PlayerLoading() const { return !m_playerLoading.IsEmpty(); }
890  bool PlayerLogout() const { return m_playerLogout; }
891  bool PlayerLogoutWithSave() const { return m_playerLogout && m_playerSave; }
892  bool PlayerRecentlyLoggedOut() const { return m_playerRecentlyLogout; }
893  bool PlayerDisconnected() const;
894 
895  void ReadAddonsInfo(ByteBuffer& data);
896  void SendAddonsInfo();
897  bool IsAddonRegistered(const std::string& prefix) const;
898 
899  void SendPacket(WorldPacket const* packet, bool forced = false);
900  void AddInstanceConnection(std::shared_ptr<WorldSocket> sock) { m_Socket[CONNECTION_TYPE_INSTANCE] = sock; }
901 
902  void SendNotification(char const* format, ...) ATTR_PRINTF(2, 3);
903  void SendNotification(uint32 stringId, ...);
904  void SendPetNameInvalid(uint32 error, std::string const& name, DeclinedName *declinedName);
905  void SendPartyResult(PartyOperation operation, std::string const& member, PartyResult res, uint32 val = 0);
906  void SendSetPhaseShift(std::set<uint32> const& phaseIds, std::set<uint32> const& terrainswaps, std::set<uint32> const& worldMapAreaSwaps);
907  void SendQueryTimeResponse();
908 
909  void SendAuthResponse(uint32 code, bool queued, uint32 queuePos = 0);
910  void SendClientCacheVersion(uint32 version);
911 
912  void InitializeSession();
913  void InitializeSessionCallback(SQLQueryHolder* realmHolder, SQLQueryHolder* holder);
914 
915  rbac::RBACData* GetRBACData();
916  bool HasPermission(uint32 permissionId);
917  void LoadPermissions();
918  PreparedQueryResultFuture LoadPermissionsAsync();
919  void InvalidateRBACData(); // Used to force LoadPermissions at next HasPermission check
920 
921  AccountTypes GetSecurity() const { return _security; }
922  uint32 GetAccountId() const { return _accountId; }
923  ObjectGuid GetAccountGUID() const { return ObjectGuid::Create<HighGuid::WowAccount>(GetAccountId()); }
924  std::string const& GetAccountName() const { return _accountName; }
925  uint32 GetBattlenetAccountId() const { return _battlenetAccountId; }
926  ObjectGuid GetBattlenetAccountGUID() const { return ObjectGuid::Create<HighGuid::BNetAccount>(GetBattlenetAccountId()); }
927  Player* GetPlayer() const { return _player; }
928  std::string const& GetPlayerName() const;
929  std::string GetPlayerInfo() const;
930 
931  void SetSecurity(AccountTypes security) { _security = security; }
932  std::string const& GetRemoteAddress() const { return m_Address; }
933  void SetPlayer(Player* player);
934  uint8 GetExpansion() const { return m_expansion; }
935  std::string const& GetOS() const { return _os; }
936 
937  void InitWarden(BigNumber* k);
938 
940  void SetInQueue(bool state) { m_inQueue = state; }
941 
943  bool isLogingOut() const { return _logoutTime || m_playerLogout; }
944 
946  void SetLogoutStartTime(time_t requestTime)
947  {
948  _logoutTime = requestTime;
949  }
950 
952  bool ShouldLogOut(time_t currTime) const
953  {
954  return (_logoutTime > 0 && currTime >= _logoutTime + 20);
955  }
956 
957  void LogoutPlayer(bool save);
958  void KickPlayer();
959 
960  void QueuePacket(WorldPacket* new_packet);
961  bool Update(uint32 diff, PacketFilter& updater);
962 
964  void SendAuthWaitQue(uint32 position);
965 
966  void SendSetTimeZoneInformation();
967  void SendFeatureSystemStatus();
968  void SendFeatureSystemStatusGlueScreen();
969 
970  void SendNameQueryOpcode(ObjectGuid guid);
971 
972  void SendTrainerList(ObjectGuid guid);
973  void SendTrainerList(ObjectGuid guid, std::string const& strTitle);
974  void SendListInventory(ObjectGuid guid);
975  void SendShowBank(ObjectGuid guid);
976  bool CanOpenMailBox(ObjectGuid guid);
977  void SendShowMailBox(ObjectGuid guid);
978  void SendTabardVendorActivate(ObjectGuid guid);
979  void SendSpiritResurrect();
980  void SendBindPoint(Creature* npc);
981 
982  void SendAttackStop(Unit const* enemy);
983 
984  void SendTradeStatus(WorldPackets::Trade::TradeStatus& status);
985  void SendUpdateTrade(bool trader_data = true);
986  void SendCancelTrade();
987 
988  void SendPetitionQueryOpcode(ObjectGuid petitionguid);
989 
990  // Pet
991  void SendQueryPetNameResponse(ObjectGuid guid);
992  void SendStablePet(ObjectGuid guid);
993  void SendStablePetCallback(PreparedQueryResult result, ObjectGuid guid);
994  void SendPetStableResult(uint8 guid);
995  bool CheckStableMaster(ObjectGuid guid);
996 
997  // Account Data
998  AccountData const* GetAccountData(AccountDataType type) const { return &_accountData[type]; }
999  void SetAccountData(AccountDataType type, uint32 time, std::string const& data);
1000  void LoadAccountData(PreparedQueryResult result, uint32 mask);
1001 
1002  void LoadTutorialsData(PreparedQueryResult result);
1003  void SendTutorialsData();
1004  void SaveTutorialsData(SQLTransaction& trans);
1005  uint32 GetTutorialInt(uint8 index) const { return _tutorials[index]; }
1007  {
1008  if (_tutorials[index] != value)
1009  {
1010  _tutorials[index] = value;
1011  _tutorialsChanged = true;
1012  }
1013  }
1014  //used with item_page table
1015  bool SendItemInfo(uint32 itemid, WorldPacket data);
1016  // Auction
1017  void SendAuctionHello(ObjectGuid guid, Creature* unit);
1018 
1029  void SendAuctionCommandResult(AuctionEntry* auction, uint32 Action, uint32 ErrorCode, uint32 bidError = 0);
1030  void SendAuctionOutBidNotification(AuctionEntry const* auction, Item const* item);
1031  void SendAuctionClosedNotification(AuctionEntry const* auction, float mailDelay, bool sold, Item const* item);
1032  void SendAuctionWonNotification(AuctionEntry const* auction, Item const* item);
1033  void SendAuctionOwnerBidNotification(AuctionEntry const* auction, Item const* item);
1034 
1035  // Black Market
1036  void SendBlackMarketOpenResult(ObjectGuid guid, Creature* auctioneer);
1037 
1038  //Item Enchantment
1039  void SendEnchantmentLog(ObjectGuid target, ObjectGuid caster, uint32 itemId, uint32 enchantId);
1040  void SendItemEnchantTimeUpdate(ObjectGuid Playerguid, ObjectGuid Itemguid, uint32 slot, uint32 Duration);
1041 
1042  //Taxi
1043  void SendTaxiStatus(ObjectGuid guid);
1044  void SendTaxiMenu(Creature* unit);
1045  void SendDoFlight(uint32 mountDisplayId, uint32 path, uint32 pathNode = 0);
1046  bool SendLearnNewTaxiNode(Creature* unit);
1047  void SendDiscoverNewTaxiNode(uint32 nodeid);
1048 
1049  // Guild/Arena Team
1050  void SendNotInArenaTeamPacket(uint8 type);
1051  void SendPetitionShowList(ObjectGuid guid);
1052 
1053  void DoLootRelease(ObjectGuid lguid);
1054 
1055  // Account mute time
1056  time_t m_muteTime;
1057 
1058  // Locales
1059  LocaleConstant GetSessionDbcLocale() const { return m_sessionDbcLocale; }
1060  LocaleConstant GetSessionDbLocaleIndex() const { return m_sessionDbLocaleIndex; }
1061  char const* GetTrinityString(uint32 entry) const;
1062 
1063  uint32 GetLatency() const { return m_latency; }
1064  void SetLatency(uint32 latency) { m_latency = latency; }
1065  void ResetClientTimeDelay() { m_clientTimeDelay = 0; }
1066 
1067  std::atomic<int32> m_timeOutTime;
1068 
1070  {
1071  m_timeOutTime -= int32(diff);
1072  }
1073 
1075  {
1076  m_timeOutTime = int32(sWorld->getIntConfig(CONFIG_SOCKET_TIMEOUTTIME));
1077  }
1078 
1079  bool IsConnectionIdle() const
1080  {
1081  return m_timeOutTime <= 0 && !m_inQueue;
1082  }
1083 
1084  // Recruit-A-Friend Handling
1085  uint32 GetRecruiterId() const { return recruiterId; }
1086  bool IsARecruiter() const { return isRecruiter; }
1087 
1088  // Battle Pets
1089  BattlePetMgr* GetBattlePetMgr() const { return _battlePetMgr.get(); }
1090 
1091  CollectionMgr* GetCollectionMgr() const { return _collectionMgr.get(); }
1092 
1093  public: // opcodes handlers
1094 
1095  void Handle_NULL(WorldPackets::Null& null); // not used
1096  void Handle_EarlyProccess(WorldPacket& recvPacket); // just mark packets processed in WorldSocket::OnRead
1097 
1098  void HandleCharEnum(PreparedQueryResult result);
1099  void HandleCharEnumOpcode(WorldPackets::Character::EnumCharacters& /*enumCharacters*/);
1100  void HandleCharUndeleteEnum(PreparedQueryResult result);
1101  void HandleCharUndeleteEnumOpcode(WorldPackets::Character::EnumCharacters& /*enumCharacters*/);
1102  void HandleCharDeleteOpcode(WorldPackets::Character::CharDelete& charDelete);
1103  void HandleCharCreateOpcode(WorldPackets::Character::CreateCharacter& charCreate);
1104  void HandleCharCreateCallback(PreparedQueryResult result, WorldPackets::Character::CharacterCreateInfo* createInfo);
1105  void HandlePlayerLoginOpcode(WorldPackets::Character::PlayerLogin& playerLogin);
1106 
1107  void SendConnectToInstance(WorldPackets::Auth::ConnectToSerial serial);
1108  void HandleContinuePlayerLogin();
1109  void AbortLogin(WorldPackets::Character::LoginFailureReason reason);
1110  void HandleLoadScreenOpcode(WorldPackets::Character::LoadingScreenNotify& loadingScreenNotify);
1111  void HandlePlayerLogin(LoginQueryHolder * holder);
1112  void HandleCharRenameOpcode(WorldPackets::Character::CharacterRenameRequest& request);
1113  void HandleCharRenameCallBack(PreparedQueryResult result, WorldPackets::Character::CharacterRenameInfo* renameInfo);
1114  void HandleSetPlayerDeclinedNames(WorldPackets::Character::SetPlayerDeclinedNames& packet);
1115  void HandleAlterAppearance(WorldPackets::Character::AlterApperance& packet);
1116  void HandleCharCustomizeOpcode(WorldPackets::Character::CharCustomize& packet);
1117  void HandleCharCustomizeCallback(PreparedQueryResult result, WorldPackets::Character::CharCustomizeInfo* customizeInfo);
1118  void HandleCharRaceOrFactionChangeOpcode(WorldPackets::Character::CharRaceOrFactionChange& packet);
1119  void HandleCharRaceOrFactionChangeCallback(PreparedQueryResult result, WorldPackets::Character::CharRaceOrFactionChangeInfo* factionChangeInfo);
1120  void HandleRandomizeCharNameOpcode(WorldPackets::Character::GenerateRandomCharacterName& packet);
1121  void HandleReorderCharacters(WorldPackets::Character::ReorderCharacters& reorderChars);
1122  void HandleOpeningCinematic(WorldPackets::Misc::OpeningCinematic& packet);
1123  void HandleGetUndeleteCooldownStatus(WorldPackets::Character::GetUndeleteCharacterCooldownStatus& /*getCooldown*/);
1124  void HandleUndeleteCooldownStatusCallback(PreparedQueryResult result);
1125  void HandleCharUndeleteOpcode(WorldPackets::Character::UndeleteCharacter& undeleteInfo);
1126  void HandleCharUndeleteCallback(PreparedQueryResult result, WorldPackets::Character::CharacterUndeleteInfo* undeleteInfo);
1127 
1128  void SendCharCreate(ResponseCodes result);
1129  void SendCharDelete(ResponseCodes result);
1130  void SendCharRename(ResponseCodes result, WorldPackets::Character::CharacterRenameInfo const* renameInfo);
1131  void SendCharCustomize(ResponseCodes result, WorldPackets::Character::CharCustomizeInfo const* customizeInfo);
1132  void SendCharFactionChange(ResponseCodes result, WorldPackets::Character::CharRaceOrFactionChangeInfo const* factionChangeInfo);
1133  void SendSetPlayerDeclinedNamesResult(DeclinedNameResult result, ObjectGuid guid);
1134  void SendBarberShopResult(BarberShopResult result);
1135  void SendUndeleteCooldownStatusResponse(uint32 currentCooldown, uint32 maxCooldown);
1136  void SendUndeleteCharacterResponse(CharacterUndeleteResult result, WorldPackets::Character::CharacterUndeleteInfo const* undeleteInfo);
1137 
1138  // played time
1139  void HandlePlayedTime(WorldPackets::Character::RequestPlayedTime& packet);
1140 
1141  // new
1142  void HandleLookingForGroup(WorldPacket& recvPacket);
1143 
1144  // cemetery/graveyard related
1145  void HandlePortGraveyard(WorldPackets::Misc::PortGraveyard& packet);
1146  void HandleRequestCemeteryList(WorldPackets::Misc::RequestCemeteryList& packet);
1147 
1148  // Inspect
1149  void HandleInspectOpcode(WorldPackets::Inspect::Inspect& inspect);
1150  void HandleRequestHonorStatsOpcode(WorldPackets::Inspect::RequestHonorStats& request);
1151  void HandleInspectPVP(WorldPackets::Inspect::InspectPVPRequest& request);
1152  void HandleQueryInspectAchievements(WorldPackets::Inspect::QueryInspectAchievements& inspect);
1153 
1154  void HandleMountSpecialAnimOpcode(WorldPackets::Misc::MountSpecial& mountSpecial);
1155 
1156  // character view
1157  void HandleShowingHelmOpcode(WorldPackets::Character::ShowingHelm& packet);
1158  void HandleShowingCloakOpcode(WorldPackets::Character::ShowingCloak& packet);
1159 
1160  // repair
1161  void HandleRepairItemOpcode(WorldPackets::Item::RepairItem& packet);
1162 
1163  // Knockback
1164  void HandleMoveKnockBackAck(WorldPackets::Movement::MovementAckMessage& movementAck);
1165 
1166  void HandleMoveTeleportAck(WorldPackets::Movement::MoveTeleportAck& packet);
1167  void HandleForceSpeedChangeAck(WorldPackets::Movement::MovementSpeedAck& packet);
1168  void HandleSetCollisionHeightAck(WorldPackets::Movement::MoveSetCollisionHeightAck& setCollisionHeightAck);
1169 
1170  void HandlePingOpcode(WorldPacket& recvPacket);
1171  void HandleRepopRequest(WorldPackets::Misc::RepopRequest& packet);
1172  void HandleAutostoreLootItemOpcode(WorldPackets::Loot::LootItem& packet);
1173  void HandleLootMoneyOpcode(WorldPackets::Loot::LootMoney& packet);
1174  void HandleLootOpcode(WorldPackets::Loot::LootUnit& packet);
1175  void HandleLootReleaseOpcode(WorldPackets::Loot::LootRelease& packet);
1176  void HandleLootMasterGiveOpcode(WorldPacket& recvPacket);
1177  void HandleSetLootSpecialization(WorldPackets::Loot::SetLootSpecialization& packet);
1178 
1179  void HandleWhoOpcode(WorldPackets::Who::WhoRequestPkt& whoRequest);
1180  void HandleLogoutRequestOpcode(WorldPackets::Character::LogoutRequest& logoutRequest);
1181  void HandleLogoutCancelOpcode(WorldPackets::Character::LogoutCancel& logoutCancel);
1182 
1183  // GM Ticket opcodes
1184  void HandleGMTicketGetCaseStatusOpcode(WorldPackets::Ticket::GMTicketGetCaseStatus& packet);
1185  void HandleGMTicketSystemStatusOpcode(WorldPackets::Ticket::GMTicketGetSystemStatus& packet);
1186  void HandleSupportTicketSubmitBug(WorldPackets::Ticket::SupportTicketSubmitBug& packet);
1187  void HandleSupportTicketSubmitSuggestion(WorldPackets::Ticket::SupportTicketSubmitSuggestion& packet);
1188  void HandleSupportTicketSubmitComplaint(WorldPackets::Ticket::SupportTicketSubmitComplaint& packet);
1189  void HandleBugReportOpcode(WorldPackets::Ticket::BugReport& bugReport);
1190  void HandleComplaint(WorldPackets::Ticket::Complaint& packet);
1191 
1192  void HandleTogglePvP(WorldPackets::Misc::TogglePvP& packet);
1193  void HandleSetPvP(WorldPackets::Misc::SetPvP& packet);
1194 
1195  void HandleSetSelectionOpcode(WorldPackets::Misc::SetSelection& packet);
1196  void HandleStandStateChangeOpcode(WorldPackets::Misc::StandStateChange& packet);
1197  void HandleEmoteOpcode(WorldPackets::Chat::EmoteClient& packet);
1198 
1199  // Social
1200  void HandleContactListOpcode(WorldPackets::Social::SendContactList& packet);
1201  void HandleAddFriendOpcode(WorldPackets::Social::AddFriend& packet);
1202  void HandleAddFriendOpcodeCallBack(PreparedQueryResult result, std::string const& friendNote);
1203  void HandleDelFriendOpcode(WorldPackets::Social::DelFriend& packet);
1204  void HandleAddIgnoreOpcode(WorldPackets::Social::AddIgnore& packet);
1205  void HandleAddIgnoreOpcodeCallBack(PreparedQueryResult result);
1206  void HandleDelIgnoreOpcode(WorldPackets::Social::DelIgnore& packet);
1207  void HandleSetContactNotesOpcode(WorldPackets::Social::SetContactNotes& packet);
1208 
1209  void HandleAreaTriggerOpcode(WorldPackets::Misc::AreaTrigger& packet);
1210 
1211  void HandleSetFactionAtWar(WorldPackets::Character::SetFactionAtWar& packet);
1212  void HandleSetFactionNotAtWar(WorldPackets::Character::SetFactionNotAtWar& packet);
1213  void HandleSetFactionCheat(WorldPacket& recvData);
1214  void HandleSetWatchedFactionOpcode(WorldPackets::Character::SetWatchedFaction& packet);
1215  void HandleSetFactionInactiveOpcode(WorldPackets::Character::SetFactionInactive& packet);
1216  void HandleRequestForcedReactionsOpcode(WorldPackets::Reputation::RequestForcedReactions& requestForcedReactions);
1217 
1218  void HandleUpdateAccountData(WorldPackets::ClientConfig::UserClientUpdateAccountData& packet);
1219  void HandleRequestAccountData(WorldPackets::ClientConfig::RequestAccountData& request);
1220  void HandleSetAdvancedCombatLogging(WorldPackets::ClientConfig::SetAdvancedCombatLogging& setAdvancedCombatLogging);
1221  void HandleSetActionButtonOpcode(WorldPackets::Spells::SetActionButton& packet);
1222 
1223  void HandleGameObjectUseOpcode(WorldPackets::GameObject::GameObjUse& packet);
1224  void HandleMeetingStoneInfo(WorldPacket& recPacket);
1225  void HandleGameobjectReportUse(WorldPackets::GameObject::GameObjReportUse& packet);
1226 
1227  void HandleNameQueryOpcode(WorldPackets::Query::QueryPlayerName& packet);
1228  void HandleQueryTimeOpcode(WorldPackets::Query::QueryTime& queryTime);
1229  void HandleCreatureQuery(WorldPackets::Query::QueryCreature& packet);
1230  void HandleDBQueryBulk(WorldPackets::Query::DBQueryBulk& packet);
1231 
1232  void HandleGameObjectQueryOpcode(WorldPackets::Query::QueryGameObject& packet);
1233 
1234  void HandleMoveWorldportAckOpcode(WorldPackets::Movement::WorldPortResponse& packet);
1235  void HandleMoveWorldportAckOpcode(); // for server-side calls
1236 
1237  void HandleMovementOpcodes(WorldPackets::Movement::ClientPlayerMovement& packet);
1238  void HandleSetActiveMoverOpcode(WorldPackets::Movement::SetActiveMover& packet);
1239  void HandleMoveDismissVehicle(WorldPackets::Vehicle::MoveDismissVehicle& moveDismissVehicle);
1240  void HandleRequestVehiclePrevSeat(WorldPackets::Vehicle::RequestVehiclePrevSeat& requestVehiclePrevSeat);
1241  void HandleRequestVehicleNextSeat(WorldPackets::Vehicle::RequestVehicleNextSeat& requestVehicleNextSeat);
1242  void HandleMoveChangeVehicleSeats(WorldPackets::Vehicle::MoveChangeVehicleSeats& moveChangeVehicleSeats);
1243  void HandleRequestVehicleSwitchSeat(WorldPackets::Vehicle::RequestVehicleSwitchSeat& requestVehicleSwitchSeat);
1244  void HandleRideVehicleInteract(WorldPackets::Vehicle::RideVehicleInteract& rideVehicleInteract);
1245  void HandleEjectPassenger(WorldPackets::Vehicle::EjectPassenger& ejectPassenger);
1246  void HandleRequestVehicleExit(WorldPackets::Vehicle::RequestVehicleExit& requestVehicleExit);
1247  void HandleMoveSetVehicleRecAck(WorldPackets::Vehicle::MoveSetVehicleRecIdAck& setVehicleRecIdAck);
1248  void HandleMoveTimeSkippedOpcode(WorldPackets::Movement::MoveTimeSkipped& moveTimeSkipped);
1249  void HandleMovementAckMessage(WorldPackets::Movement::MovementAckMessage& movementAck);
1250 
1251  void HandleRequestRaidInfoOpcode(WorldPackets::Party::RequestRaidInfo& packet);
1252 
1253  void HandlePartyInviteOpcode(WorldPackets::Party::PartyInviteClient& packet);
1254  //void HandleGroupCancelOpcode(WorldPacket& recvPacket);
1255  void HandlePartyInviteResponseOpcode(WorldPackets::Party::PartyInviteResponse& packet);
1256  void HandlePartyUninviteOpcode(WorldPackets::Party::PartyUninvite& packet);
1257  void HandleSetPartyLeaderOpcode(WorldPackets::Party::SetPartyLeader& packet);
1258  void HandleSetRoleOpcode(WorldPackets::Party::SetRole& packet);
1259  void HandleLeaveGroupOpcode(WorldPackets::Party::LeaveGroup& packet);
1260  void HandleOptOutOfLootOpcode(WorldPackets::Party::OptOutOfLoot& packet);
1261  void HandleSetLootMethodOpcode(WorldPackets::Party::SetLootMethod& packet);
1262  void HandleLootRoll(WorldPackets::Loot::LootRoll& packet);
1263  void HandleRequestPartyMemberStatsOpcode(WorldPackets::Party::RequestPartyMemberStats& packet);
1264  void HandleUpdateRaidTargetOpcode(WorldPackets::Party::UpdateRaidTarget& packet);
1265  void HandleDoReadyCheckOpcode(WorldPackets::Party::DoReadyCheck& packet);
1266  void HandleReadyCheckResponseOpcode(WorldPackets::Party::ReadyCheckResponseClient& packet);
1267  void HandleConvertRaidOpcode(WorldPackets::Party::ConvertRaid& packet);
1268  void HandleRequestPartyJoinUpdates(WorldPackets::Party::RequestPartyJoinUpdates& packet);
1269  void HandleChangeSubGroupOpcode(WorldPackets::Party::ChangeSubGroup& packet);
1270  void HandleSwapSubGroupsOpcode(WorldPackets::Party::SwapSubGroups& packet);
1271  void HandleSetAssistantLeaderOpcode(WorldPackets::Party::SetAssistantLeader& packet);
1272  void HandleSetPartyAssignment(WorldPackets::Party::SetPartyAssignment& packet);
1273  void HandleInitiateRolePoll(WorldPackets::Party::InitiateRolePoll& packet);
1274  void HandleSetEveryoneIsAssistant(WorldPackets::Party::SetEveryoneIsAssistant& packet);
1275  void HandleClearRaidMarker(WorldPackets::Party::ClearRaidMarker& packet);
1276 
1277  void HandleDeclinePetition(WorldPackets::Petition::DeclinePetition& packet);
1278  void HandleOfferPetition(WorldPackets::Petition::OfferPetition& packet);
1279  void HandlePetitionBuy(WorldPackets::Petition::PetitionBuy& packet);
1280  void HandlePetitionShowSignatures(WorldPackets::Petition::PetitionShowSignatures& packet);
1281  void HandleQueryPetition(WorldPackets::Petition::QueryPetition& packet);
1282  void HandlePetitionRenameGuild(WorldPackets::Petition::PetitionRenameGuild& packet);
1283  void HandleSignPetition(WorldPackets::Petition::SignPetition& packet);
1284  void HandleTurnInPetition(WorldPackets::Petition::TurnInPetition& packet);
1285 
1286  void HandleGuildQueryOpcode(WorldPackets::Guild::QueryGuildInfo& query);
1287  void HandleGuildInviteByName(WorldPackets::Guild::GuildInviteByName& packet);
1288  void HandleGuildOfficerRemoveMember(WorldPackets::Guild::GuildOfficerRemoveMember& packet);
1289  void HandleGuildAcceptInvite(WorldPackets::Guild::AcceptGuildInvite& invite);
1290  void HandleGuildDeclineInvitation(WorldPackets::Guild::GuildDeclineInvitation& decline);
1291  void HandleGuildEventLogQuery(WorldPackets::Guild::GuildEventLogQuery& packet);
1292  void HandleGuildGetRoster(WorldPackets::Guild::GuildGetRoster& packet);
1293  void HandleRequestGuildRewardsList(WorldPackets::Guild::RequestGuildRewardsList& packet);
1294  void HandleGuildPromoteMember(WorldPackets::Guild::GuildPromoteMember& promote);
1295  void HandleGuildDemoteMember(WorldPackets::Guild::GuildDemoteMember& demote);
1296  void HandleGuildAssignRank(WorldPackets::Guild::GuildAssignMemberRank& packet);
1297  void HandleGuildLeave(WorldPackets::Guild::GuildLeave& leave);
1298  void HandleGuildDelete(WorldPackets::Guild::GuildDelete& packet);
1299  void HandleGuildSetAchievementTracking(WorldPackets::Guild::GuildSetAchievementTracking& packet);
1300  void HandleGuildSetGuildMaster(WorldPackets::Guild::GuildSetGuildMaster& packet);
1301  void HandleGuildUpdateMotdText(WorldPackets::Guild::GuildUpdateMotdText& packet);
1302  void HandleGuildNewsUpdateSticky(WorldPackets::Guild::GuildNewsUpdateSticky& packet);
1303  void HandleGuildSetMemberNote(WorldPackets::Guild::GuildSetMemberNote& packet);
1304  void HandleGuildGetRanks(WorldPackets::Guild::GuildGetRanks& packet);
1305  void HandleGuildQueryNews(WorldPackets::Guild::GuildQueryNews& newsQuery);
1306  void HandleGuildSetRankPermissions(WorldPackets::Guild::GuildSetRankPermissions& packet);
1307  void HandleGuildAddRank(WorldPackets::Guild::GuildAddRank& packet);
1308  void HandleGuildDeleteRank(WorldPackets::Guild::GuildDeleteRank& packet);
1309  void HandleGuildUpdateInfoText(WorldPackets::Guild::GuildUpdateInfoText& packet);
1310  void HandleSaveGuildEmblem(WorldPackets::Guild::SaveGuildEmblem& packet);
1311  void HandleGuildRequestPartyState(WorldPackets::Guild::RequestGuildPartyState& packet);
1312  void HandleGuildChallengeUpdateRequest(WorldPackets::Guild::GuildChallengeUpdateRequest& packet);
1313  void HandleDeclineGuildInvites(WorldPackets::Guild::DeclineGuildInvites& packet);
1314 
1315  void HandleGuildFinderAddRecruit(WorldPackets::GuildFinder::LFGuildAddRecruit& lfGuildAddRecruit);
1316  void HandleGuildFinderBrowse(WorldPackets::GuildFinder::LFGuildBrowse& lfGuildBrowse);
1317  void HandleGuildFinderDeclineRecruit(WorldPackets::GuildFinder::LFGuildDeclineRecruit& lfGuildDeclineRecruit);
1318  void HandleGuildFinderGetApplications(WorldPackets::GuildFinder::LFGuildGetApplications& lfGuildGetApplications);
1319  void HandleGuildFinderGetGuildPost(WorldPackets::GuildFinder::LFGuildGetGuildPost& lfGuildGetGuildPost);
1320  void HandleGuildFinderGetRecruits(WorldPackets::GuildFinder::LFGuildGetRecruits& lfGuildGetRecruits);
1321  void HandleGuildFinderRemoveRecruit(WorldPackets::GuildFinder::LFGuildRemoveRecruit& lfGuildRemoveRecruit);
1322  void HandleGuildFinderSetGuildPost(WorldPackets::GuildFinder::LFGuildSetGuildPost& lfGuildSetGuildPost);
1323 
1324  void HandleEnableTaxiNodeOpcode(WorldPackets::Taxi::EnableTaxiNode& enableTaxiNode);
1325  void HandleTaxiNodeStatusQueryOpcode(WorldPackets::Taxi::TaxiNodeStatusQuery& taxiNodeStatusQuery);
1326  void HandleTaxiQueryAvailableNodesOpcode(WorldPackets::Taxi::TaxiQueryAvailableNodes& taxiQueryAvailableNodes);
1327  void HandleActivateTaxiOpcode(WorldPackets::Taxi::ActivateTaxi& activateTaxi);
1328  void HandleMoveSplineDoneOpcode(WorldPackets::Movement::MoveSplineDone& moveSplineDone);
1329  void SendActivateTaxiReply(ActivateTaxiReply reply);
1330  void HandleTaxiRequestEarlyLanding(WorldPackets::Taxi::TaxiRequestEarlyLanding& taxiRequestEarlyLanding);
1331 
1332  void HandleTabardVendorActivateOpcode(WorldPackets::NPC::Hello& packet);
1333  void HandleBankerActivateOpcode(WorldPackets::NPC::Hello& packet);
1334  void HandleTrainerListOpcode(WorldPackets::NPC::Hello& packet);
1335  void HandleTrainerBuySpellOpcode(WorldPackets::NPC::TrainerBuySpell& packet);
1336  void HandlePetitionShowList(WorldPackets::Petition::PetitionShowList& packet);
1337  void HandleGossipHelloOpcode(WorldPackets::NPC::Hello& packet);
1338  void HandleGossipSelectOptionOpcode(WorldPackets::NPC::GossipSelectOption& packet);
1339  void HandleSpiritHealerActivate(WorldPackets::NPC::SpiritHealerActivate& packet);
1340  void HandleNpcTextQueryOpcode(WorldPackets::Query::QueryNPCText& packet);
1341  void HandleBinderActivateOpcode(WorldPackets::NPC::Hello& packet);
1342  void HandleRequestStabledPets(WorldPackets::NPC::RequestStabledPets& packet);
1343  void HandleStablePet(WorldPacket& recvPacket);
1344  void HandleStablePetCallback(PreparedQueryResult result);
1345  void HandleUnstablePet(WorldPacket& recvPacket);
1346  void HandleUnstablePetCallback(PreparedQueryResult result, uint32 petId);
1347  void HandleBuyStableSlot(WorldPacket& recvPacket);
1348  void HandleStableRevivePet(WorldPacket& recvPacket);
1349  void HandleStableSwapPet(WorldPacket& recvPacket);
1350  void HandleStableSwapPetCallback(PreparedQueryResult result, uint32 petId);
1351  void SendTrainerBuyFailed(ObjectGuid trainerGUID, uint32 spellID, int32 trainerFailedReason);
1352 
1353  void HandleCanDuel(WorldPackets::Duel::CanDuel& packet);
1354  void HandleDuelResponseOpcode(WorldPackets::Duel::DuelResponse& duelResponse);
1355  void HandleDuelAccepted();
1356  void HandleDuelCancelled();
1357 
1358  void HandleAcceptTradeOpcode(WorldPackets::Trade::AcceptTrade& acceptTrade);
1359  void HandleBeginTradeOpcode(WorldPackets::Trade::BeginTrade& beginTrade);
1360  void HandleBusyTradeOpcode(WorldPackets::Trade::BusyTrade& busyTrade);
1361  void HandleCancelTradeOpcode(WorldPackets::Trade::CancelTrade& cancelTrade);
1362  void HandleClearTradeItemOpcode(WorldPackets::Trade::ClearTradeItem& clearTradeItem);
1363  void HandleIgnoreTradeOpcode(WorldPackets::Trade::IgnoreTrade& ignoreTrade);
1364  void HandleInitiateTradeOpcode(WorldPackets::Trade::InitiateTrade& initiateTrade);
1365  void HandleSetTradeCurrencyOpcode(WorldPackets::Trade::SetTradeCurrency& setTradeCurrency);
1366  void HandleSetTradeGoldOpcode(WorldPackets::Trade::SetTradeGold& setTradeGold);
1367  void HandleSetTradeItemOpcode(WorldPackets::Trade::SetTradeItem& setTradeItem);
1368  void HandleUnacceptTradeOpcode(WorldPackets::Trade::UnacceptTrade& unacceptTrade);
1369 
1370  void HandleAuctionHelloOpcode(WorldPackets::AuctionHouse::AuctionHelloRequest& packet);
1371  void HandleAuctionListItems(WorldPackets::AuctionHouse::AuctionListItems& packet);
1372  void HandleAuctionListBidderItems(WorldPackets::AuctionHouse::AuctionListBidderItems& packet);
1373  void HandleAuctionSellItem(WorldPackets::AuctionHouse::AuctionSellItem& packet);
1374  void HandleAuctionRemoveItem(WorldPackets::AuctionHouse::AuctionRemoveItem& packet);
1375  void HandleAuctionListOwnerItems(WorldPackets::AuctionHouse::AuctionListOwnerItems& packet);
1376  void HandleAuctionPlaceBid(WorldPackets::AuctionHouse::AuctionPlaceBid& packet);
1377  void HandleAuctionListPendingSales(WorldPackets::AuctionHouse::AuctionListPendingSales& packet);
1378  void HandleReplicateItems(WorldPackets::AuctionHouse::AuctionReplicateItems& packet);
1379 
1380  // Bank
1381  void HandleAutoBankItemOpcode(WorldPackets::Bank::AutoBankItem& packet);
1382  void HandleAutoStoreBankItemOpcode(WorldPackets::Bank::AutoStoreBankItem& packet);
1383  void HandleBuyBankSlotOpcode(WorldPackets::Bank::BuyBankSlot& packet);
1384 
1385  // Black Market
1386  void HandleBlackMarketOpen(WorldPackets::BlackMarket::BlackMarketOpen& packet);
1387 
1388  void HandleGetMailList(WorldPackets::Mail::MailGetList& packet);
1389  void HandleSendMail(WorldPackets::Mail::SendMail& packet);
1390  void HandleMailTakeMoney(WorldPackets::Mail::MailTakeMoney& packet);
1391  void HandleMailTakeItem(WorldPackets::Mail::MailTakeItem& packet);
1392  void HandleMailMarkAsRead(WorldPackets::Mail::MailMarkAsRead& packet);
1393  void HandleMailReturnToSender(WorldPackets::Mail::MailReturnToSender& packet);
1394  void HandleMailDelete(WorldPackets::Mail::MailDelete& packet);
1395  void HandleItemTextQuery(WorldPackets::Query::ItemTextQuery& itemTextQuery);
1396  void HandleMailCreateTextItem(WorldPackets::Mail::MailCreateTextItem& packet);
1397  void HandleQueryNextMailTime(WorldPackets::Mail::MailQueryNextMailTime& packet);
1398  void HandleCancelChanneling(WorldPackets::Spells::CancelChannelling& cancelChanneling);
1399 
1400  void SendItemPageInfo(ItemTemplate* itemProto);
1401  void HandleSplitItemOpcode(WorldPackets::Item::SplitItem& splitItem);
1402  void HandleSwapInvItemOpcode(WorldPackets::Item::SwapInvItem& swapInvItem);
1403  void HandleDestroyItemOpcode(WorldPackets::Item::DestroyItem& destroyItem);
1404  void HandleAutoEquipItemOpcode(WorldPackets::Item::AutoEquipItem& autoEquipItem);
1405  void HandleSellItemOpcode(WorldPackets::Item::SellItem& packet);
1406  void HandleBuyItemOpcode(WorldPackets::Item::BuyItem& packet);
1407  void HandleListInventoryOpcode(WorldPackets::NPC::Hello& packet);
1408  void HandleAutoStoreBagItemOpcode(WorldPackets::Item::AutoStoreBagItem& packet);
1409  void HandleReadItem(WorldPackets::Item::ReadItem& readItem);
1410  void HandleAutoEquipItemSlotOpcode(WorldPackets::Item::AutoEquipItemSlot& autoEquipItemSlot);
1411  void HandleSwapItem(WorldPackets::Item::SwapItem& swapItem);
1412  void HandleBuybackItem(WorldPackets::Item::BuyBackItem& packet);
1413  void HandleWrapItem(WorldPackets::Item::WrapItem& packet);
1414  void HandleUseCritterItem(WorldPackets::Item::UseCritterItem& packet);
1415 
1416  void HandleAttackSwingOpcode(WorldPackets::Combat::AttackSwing& packet);
1417  void HandleAttackStopOpcode(WorldPackets::Combat::AttackStop& packet);
1418  void HandleSetSheathedOpcode(WorldPackets::Combat::SetSheathed& packet);
1419 
1420  void HandleUseItemOpcode(WorldPackets::Spells::UseItem& packet);
1421  void HandleOpenItemOpcode(WorldPackets::Spells::OpenItem& packet);
1422  void HandleCastSpellOpcode(WorldPackets::Spells::CastSpell& castRequest);
1423  void HandleCancelCastOpcode(WorldPackets::Spells::CancelCast& packet);
1424  void HandleCancelAuraOpcode(WorldPackets::Spells::CancelAura& cancelAura);
1425  void HandleCancelGrowthAuraOpcode(WorldPackets::Spells::CancelGrowthAura& cancelGrowthAura);
1426  void HandleCancelMountAuraOpcode(WorldPackets::Spells::CancelMountAura& cancelMountAura);
1427  void HandleCancelAutoRepeatSpellOpcode(WorldPackets::Spells::CancelAutoRepeatSpell& cancelAutoRepeatSpell);
1428  void HandleMissileTrajectoryCollision(WorldPackets::Spells::MissileTrajectoryCollision& packet);
1429  void HandleUpdateMissileTrajectory(WorldPackets::Spells::UpdateMissileTrajectory& packet);
1430 
1431  void HandleLearnTalentsOpcode(WorldPackets::Talent::LearnTalents& packet);
1432  void HandleConfirmRespecWipeOpcode(WorldPackets::Talent::ConfirmRespecWipe& confirmRespecWipe);
1433  void HandleUnlearnSkillOpcode(WorldPackets::Spells::UnlearnSkill& packet);
1434  void HandleSetSpecializationOpcode(WorldPackets::Talent::SetSpecialization& packet);
1435 
1436  void HandleQuestgiverStatusQueryOpcode(WorldPackets::Quest::QuestGiverStatusQuery& packet);
1437  void HandleQuestgiverStatusMultipleQuery(WorldPackets::Quest::QuestGiverStatusMultipleQuery& packet);
1438  void HandleQuestgiverHelloOpcode(WorldPackets::Quest::QuestGiverHello& packet);
1439  void HandleQuestgiverAcceptQuestOpcode(WorldPackets::Quest::QuestGiverAcceptQuest& packet);
1440  void HandleQuestgiverQueryQuestOpcode(WorldPackets::Quest::QuestGiverQueryQuest& packet);
1441  void HandleQuestgiverChooseRewardOpcode(WorldPackets::Quest::QuestGiverChooseReward& packet);
1442  void HandleQuestgiverRequestRewardOpcode(WorldPackets::Quest::QuestGiverRequestReward& packet);
1443  void HandleQuestQueryOpcode(WorldPackets::Quest::QueryQuestInfo& packet);
1444  void HandleQuestgiverCancel(WorldPacket& recvData);
1445  void HandleQuestLogRemoveQuest(WorldPackets::Quest::QuestLogRemoveQuest& packet);
1446  void HandleQuestConfirmAccept(WorldPackets::Quest::QuestConfirmAccept& packet);
1447  void HandleQuestgiverCompleteQuest(WorldPackets::Quest::QuestGiverCompleteQuest& packet);
1448  void HandleQuestgiverQuestAutoLaunch(WorldPacket& recvPacket);
1449  void HandlePushQuestToParty(WorldPackets::Quest::PushQuestToParty& packet);
1450  void HandleQuestPushResult(WorldPackets::Quest::QuestPushResult& packet);
1451 
1452  void HandleChatMessageOpcode(WorldPackets::Chat::ChatMessage& chatMessage);
1453  void HandleChatMessageWhisperOpcode(WorldPackets::Chat::ChatMessageWhisper& chatMessageWhisper);
1454  void HandleChatMessageChannelOpcode(WorldPackets::Chat::ChatMessageChannel& chatMessageChannel);
1455  void HandleChatMessage(ChatMsg type, uint32 lang, std::string msg, std::string target = "");
1456  void HandleChatAddonMessageOpcode(WorldPackets::Chat::ChatAddonMessage& chatAddonMessage);
1457  void HandleChatAddonMessageWhisperOpcode(WorldPackets::Chat::ChatAddonMessageWhisper& chatAddonMessageWhisper);
1458  void HandleChatAddonMessageChannelOpcode(WorldPackets::Chat::ChatAddonMessageChannel& chatAddonMessageChannel);
1459  void HandleChatAddonMessage(ChatMsg type, std::string prefix, std::string text, std::string target = "");
1460  void HandleChatMessageAFKOpcode(WorldPackets::Chat::ChatMessageAFK& chatMessageAFK);
1461  void HandleChatMessageDNDOpcode(WorldPackets::Chat::ChatMessageDND& chatMessageDND);
1462  void HandleChatMessageEmoteOpcode(WorldPackets::Chat::ChatMessageEmote& chatMessageEmote);
1463  void SendChatPlayerNotfoundNotice(std::string const& name);
1464  void SendPlayerAmbiguousNotice(std::string const& name);
1465  void SendChatRestricted(ChatRestrictionType restriction);
1466  void HandleTextEmoteOpcode(WorldPackets::Chat::CTextEmote& packet);
1467  void HandleChatIgnoredOpcode(WorldPackets::Chat::ChatReportIgnored& chatReportIgnored);
1468 
1469  void HandleUnregisterAllAddonPrefixesOpcode(WorldPackets::Chat::ChatUnregisterAllAddonPrefixes& packet);
1470  void HandleAddonRegisteredPrefixesOpcode(WorldPackets::Chat::ChatRegisterAddonPrefixes& packet);
1471 
1472  void HandleReclaimCorpse(WorldPackets::Misc::ReclaimCorpse& packet);
1473  void HandleQueryCorpseLocation(WorldPackets::Query::QueryCorpseLocationFromClient& packet);
1474  void HandleQueryCorpseTransport(WorldPackets::Query::QueryCorpseTransport& packet);
1475  void HandleResurrectResponse(WorldPackets::Misc::ResurrectResponse& packet);
1476  void HandleSummonResponseOpcode(WorldPackets::Movement::SummonResponse& packet);
1477 
1478  void HandleJoinChannel(WorldPackets::Channel::JoinChannel& packet);
1479  void HandleLeaveChannel(WorldPackets::Channel::LeaveChannel& packet);
1480 
1481  template<void(Channel::*CommandFunction)(Player const*)>
1482  void HandleChannelCommand(WorldPackets::Channel::ChannelPlayerCommand& packet);
1483 
1484  template<void(Channel::*CommandFunction)(Player const*, std::string const&)>
1485  void HandleChannelPlayerCommand(WorldPackets::Channel::ChannelPlayerCommand& packet);
1486 
1487  void HandleVoiceSessionEnable(WorldPackets::Voice::VoiceSessionEnable& packet);
1488  void HandleSetActiveVoiceChannel(WorldPackets::Voice::SetActiveVoiceChannel& packet);
1489 
1490  void HandleCompleteCinematic(WorldPackets::Misc::CompleteCinematic& packet);
1491  void HandleNextCinematicCamera(WorldPackets::Misc::NextCinematicCamera& packet);
1492 
1493  void HandleQueryPageText(WorldPackets::Query::QueryPageText& packet);
1494 
1495  void HandleTutorialFlag(WorldPackets::Misc::TutorialSetFlag& packet);
1496 
1497  //Pet
1498  void HandlePetAction(WorldPackets::Pet::PetAction& packet);
1499  void HandlePetStopAttack(WorldPackets::Pet::PetStopAttack& packet);
1500  void HandlePetActionHelper(Unit* pet, ObjectGuid guid1, uint32 spellid, uint16 flag, ObjectGuid guid2, float x, float y, float z);
1501  void HandleQueryPetName(WorldPackets::Query::QueryPetName& packet);
1502  void HandlePetSetAction(WorldPackets::Pet::PetSetAction& packet);
1503  void HandlePetAbandon(WorldPackets::Pet::PetAbandon& packet);
1504  void HandlePetRename(WorldPackets::Pet::PetRename& packet);
1505  void HandlePetCancelAuraOpcode(WorldPackets::Spells::PetCancelAura& packet);
1506  void HandlePetSpellAutocastOpcode(WorldPackets::Pet::PetSpellAutocast& packet);
1507  void HandlePetCastSpellOpcode(WorldPackets::Spells::PetCastSpell& petCastSpell);
1508 
1509  void HandleSetActionBarToggles(WorldPackets::Character::SetActionBarToggles& packet);
1510 
1511  void HandleTotemDestroyed(WorldPackets::Totem::TotemDestroyed& totemDestroyed);
1512  void HandleDismissCritter(WorldPackets::Pet::DismissCritter& dismissCritter);
1513 
1514  //Battleground
1515  void HandleBattlemasterHelloOpcode(WorldPackets::NPC::Hello& hello);
1516  void HandleBattlemasterJoinOpcode(WorldPackets::Battleground::BattlemasterJoin& battlemasterJoin);
1517  void HandlePVPLogDataOpcode(WorldPackets::Battleground::PVPLogDataRequest& pvpLogDataRequest);
1518  void HandleBattleFieldPortOpcode(WorldPackets::Battleground::BattlefieldPort& battlefieldPort);
1519  void HandleBattlefieldListOpcode(WorldPackets::Battleground::BattlefieldListRequest& battlefieldList);
1520  void HandleBattlefieldLeaveOpcode(WorldPackets::Battleground::BattlefieldLeave& battlefieldLeave);
1521  void HandleBattlemasterJoinArena(WorldPackets::Battleground::BattlemasterJoinArena& packet);
1522  void HandleReportPvPAFK(WorldPackets::Battleground::ReportPvPPlayerAFK& reportPvPPlayerAFK);
1523  void HandleRequestRatedBattlefieldInfo(WorldPackets::Battleground::RequestRatedBattlefieldInfo& packet);
1524  void HandleGetPVPOptionsEnabled(WorldPackets::Battleground::GetPVPOptionsEnabled& getPvPOptionsEnabled);
1525  void HandleRequestPvpReward(WorldPackets::Battleground::RequestPVPRewards& packet);
1526  void HandleAreaSpiritHealerQueryOpcode(WorldPackets::Battleground::AreaSpiritHealerQuery& areaSpiritHealerQuery);
1527  void HandleAreaSpiritHealerQueueOpcode(WorldPackets::Battleground::AreaSpiritHealerQueue& areaSpiritHealerQueue);
1528  void HandleHearthAndResurrect(WorldPackets::Battleground::HearthAndResurrect& hearthAndResurrect);
1529  void HandleRequestBattlefieldStatusOpcode(WorldPackets::Battleground::RequestBattlefieldStatus& requestBattlefieldStatus);
1530 
1531  // Battlefield
1532  void SendBfInvitePlayerToWar(uint64 queueId, uint32 zoneId, uint32 acceptTime);
1533  void SendBfInvitePlayerToQueue(uint64 queueId, int8 battleState);
1534  void SendBfQueueInviteResponse(uint64 queueId, uint32 zoneId, int8 battleStatus, bool canQueue = true, bool loggingIn = false);
1535  void SendBfEntered(uint64 queueId, bool relocated, bool onOffense);
1536  void SendBfLeaveMessage(uint64 queueId, int8 battleState, bool relocated, BFLeaveReason reason = BF_LEAVE_REASON_EXITED);
1537  void HandleBfEntryInviteResponse(WorldPackets::Battlefield::BFMgrEntryInviteResponse& bfMgrEntryInviteResponse);
1538  void HandleBfQueueInviteResponse(WorldPackets::Battlefield::BFMgrQueueInviteResponse& bfMgrQueueInviteResponse);
1539  void HandleBfQueueExitRequest(WorldPackets::Battlefield::BFMgrQueueExitRequest& bfMgrQueueExitRequest);
1540 
1541 
1542  void HandleWorldTeleportOpcode(WorldPackets::Misc::WorldTeleport& worldTeleport);
1543  void HandleMinimapPingOpcode(WorldPackets::Party::MinimapPingClient& packet);
1544  void HandleRandomRollOpcode(WorldPackets::Misc::RandomRollClient& packet);
1545  void HandleFarSightOpcode(WorldPackets::Misc::FarSight& packet);
1546  void HandleSetDungeonDifficultyOpcode(WorldPackets::Misc::SetDungeonDifficulty& setDungeonDifficulty);
1547  void HandleSetRaidDifficultyOpcode(WorldPackets::Misc::SetRaidDifficulty& setRaidDifficulty);
1548  void HandleSetTitleOpcode(WorldPackets::Character::SetTitle& packet);
1549  void HandleTimeSyncResponse(WorldPackets::Misc::TimeSyncResponse& packet);
1550  void HandleWhoIsOpcode(WorldPackets::Who::WhoIsRequest& packet);
1551  void HandleResetInstancesOpcode(WorldPackets::Instance::ResetInstances& packet);
1552  void HandleInstanceLockResponse(WorldPackets::Instance::InstanceLockResponse& packet);
1553 
1554  // Looking for Dungeon/Raid
1555  void HandleLfgSetCommentOpcode(WorldPacket& recvData);
1556  void HandleDFGetSystemInfo(WorldPacket& recvData);
1557  void SendLfgPlayerLockInfo();
1558  void SendLfgPartyLockInfo();
1559  void HandleLfgJoinOpcode(WorldPacket& recvData);
1560  void HandleLfgLeaveOpcode(WorldPacket& recvData);
1561  void HandleLfgSetRolesOpcode(WorldPacket& recvData);
1562  void HandleLfgProposalResultOpcode(WorldPacket& recvData);
1563  void HandleLfgSetBootVoteOpcode(WorldPacket& recvData);
1564  void HandleLfgTeleportOpcode(WorldPacket& recvData);
1565  void HandleLfrJoinOpcode(WorldPacket& recvData);
1566  void HandleLfrLeaveOpcode(WorldPacket& recvData);
1567  void HandleDFGetJoinStatus(WorldPacket& recvData);
1568 
1569  void SendLfgUpdateStatus(lfg::LfgUpdateData const& updateData, bool party);
1570  void SendLfgRoleChosen(ObjectGuid guid, uint8 roles);
1571  void SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& pRoleCheck);
1572  void SendLfgLfrList(bool update);
1573  void SendLfgJoinResult(lfg::LfgJoinResultData const& joinData);
1574  void SendLfgQueueStatus(lfg::LfgQueueStatusData const& queueData);
1575  void SendLfgPlayerReward(lfg::LfgPlayerRewardData const& lfgPlayerRewardData);
1576  void SendLfgBootProposalUpdate(lfg::LfgPlayerBoot const& boot);
1577  void SendLfgUpdateProposal(lfg::LfgProposal const& proposal);
1578  void SendLfgDisabled();
1579  void SendLfgOfferContinue(uint32 dungeonEntry);
1580  void SendLfgTeleportError(uint8 err);
1581 
1582  void HandleSelfResOpcode(WorldPackets::Spells::SelfRes& packet);
1583  void HandleRequestPetInfo(WorldPackets::Pet::RequestPetInfo& packet);
1584 
1585  // Socket gem
1586  void HandleSocketGems(WorldPackets::Item::SocketGems& socketGems);
1587 
1588  void HandleCancelTempEnchantmentOpcode(WorldPackets::Item::CancelTempEnchantment& cancelTempEnchantment);
1589 
1590  void HandleGetItemPurchaseData(WorldPackets::Item::GetItemPurchaseData& packet);
1591  void HandleItemRefund(WorldPackets::Item::ItemPurchaseRefund& packet);
1592 
1593  void HandleSetTaxiBenchmark(WorldPackets::Misc::SetTaxiBenchmarkMode& packet);
1594 
1595  // Guild Bank
1596  void HandleGuildPermissionsQuery(WorldPackets::Guild::GuildPermissionsQuery& packet);
1597  void HandleGuildBankMoneyWithdrawn(WorldPackets::Guild::GuildBankRemainingWithdrawMoneyQuery& packet);
1598  void HandleGuildBankActivate(WorldPackets::Guild::GuildBankActivate& packet);
1599  void HandleGuildBankQueryTab(WorldPackets::Guild::GuildBankQueryTab& packet);
1600  void HandleGuildBankLogQuery(WorldPackets::Guild::GuildBankLogQuery& packet);
1601  void HandleGuildBankDepositMoney(WorldPackets::Guild::GuildBankDepositMoney& packet);
1602  void HandleGuildBankWithdrawMoney(WorldPackets::Guild::GuildBankWithdrawMoney& packet);
1603  void HandleGuildBankSwapItems(WorldPackets::Guild::GuildBankSwapItems& packet);
1604 
1605  void HandleGuildBankUpdateTab(WorldPackets::Guild::GuildBankUpdateTab& packet);
1606  void HandleGuildBankBuyTab(WorldPackets::Guild::GuildBankBuyTab& packet);
1607  void HandleGuildBankTextQuery(WorldPackets::Guild::GuildBankTextQuery& packet);
1608  void HandleGuildBankSetTabText(WorldPackets::Guild::GuildBankSetTabText& packet);
1609 
1610  // Refer-a-Friend
1611  void HandleGrantLevel(WorldPackets::RaF::GrantLevel& grantLevel);
1612  void HandleAcceptGrantLevel(WorldPackets::RaF::AcceptLevelGrant& acceptLevelGrant);
1613 
1614  // Calendar
1615  void HandleCalendarGetCalendar(WorldPackets::Calendar::CalendarGetCalendar& calendarGetCalendar);
1616  void HandleCalendarGetEvent(WorldPackets::Calendar::CalendarGetEvent& calendarGetEvent);
1617  void HandleCalendarGuildFilter(WorldPackets::Calendar::CalendarGuildFilter& calendarGuildFilter);
1618  void HandleCalendarAddEvent(WorldPackets::Calendar::CalendarAddEvent& calendarAddEvent);
1619  void HandleCalendarUpdateEvent(WorldPackets::Calendar::CalendarUpdateEvent& calendarUpdateEvent);
1620  void HandleCalendarRemoveEvent(WorldPackets::Calendar::CalendarRemoveEvent& calendarRemoveEvent);
1621  void HandleCalendarCopyEvent(WorldPackets::Calendar::CalendarCopyEvent& calendarCopyEvent);
1622  void HandleCalendarEventInvite(WorldPackets::Calendar::CalendarEventInvite& calendarEventInvite);
1623  void HandleCalendarEventRsvp(WorldPackets::Calendar::CalendarEventRSVP& calendarEventRSVP);
1624  void HandleCalendarEventRemoveInvite(WorldPackets::Calendar::CalendarRemoveInvite& calendarRemoveInvite);
1625  void HandleCalendarEventStatus(WorldPackets::Calendar::CalendarEventStatus& calendarEventStatus);
1626  void HandleCalendarEventModeratorStatus(WorldPackets::Calendar::CalendarEventModeratorStatus& calendarEventModeratorStatus);
1627  void HandleCalendarComplain(WorldPackets::Calendar::CalendarComplain& calendarComplain);
1628  void HandleCalendarGetNumPending(WorldPackets::Calendar::CalendarGetNumPending& calendarGetNumPending);
1629  void HandleCalendarEventSignup(WorldPackets::Calendar::CalendarEventSignUp& calendarEventSignUp);
1630 
1631  void SendCalendarRaidLockout(InstanceSave const* save, bool add);
1632  void SendCalendarRaidLockoutUpdated(InstanceSave const* save);
1633  void HandleSetSavedInstanceExtend(WorldPackets::Calendar::SetSavedInstanceExtend& setSavedInstanceExtend);
1634 
1635  // Void Storage
1636  void HandleVoidStorageUnlock(WorldPackets::VoidStorage::UnlockVoidStorage& unlockVoidStorage);
1637  void HandleVoidStorageQuery(WorldPackets::VoidStorage::QueryVoidStorage& queryVoidStorage);
1638  void HandleVoidStorageTransfer(WorldPackets::VoidStorage::VoidStorageTransfer& voidStorageTransfer);
1639  void HandleVoidSwapItem(WorldPackets::VoidStorage::SwapVoidItem& swapVoidItem);
1640  void SendVoidStorageTransferResult(VoidTransferError result);
1641 
1642  // Transmogrification
1643  void HandleTransmogrifyItems(WorldPackets::Item::TransmogrifyItems& transmogrifyItems);
1644 
1645  // Miscellaneous
1646  void HandleSpellClick(WorldPackets::Spells::SpellClick& spellClick);
1647  void HandleMirrorImageDataRequest(WorldPackets::Spells::GetMirrorImageData& getMirrorImageData);
1648  void HandleRemoveGlyph(WorldPacket& recvData);
1649  void HandleGuildSetFocusedAchievement(WorldPackets::Achievement::GuildSetFocusedAchievement& setFocusedAchievement);
1650  void HandleEquipmentSetSave(WorldPackets::EquipmentSet::SaveEquipmentSet& saveEquipmentSet);
1651  void HandleDeleteEquipmentSet(WorldPackets::EquipmentSet::DeleteEquipmentSet& deleteEquipmentSet);
1652  void HandleUseEquipmentSet(WorldPackets::EquipmentSet::UseEquipmentSet& useEquipmentSet);
1653  void HandleUITimeRequest(WorldPackets::Misc::UITimeRequest& /*request*/);
1654  void HandleQueryQuestCompletionNPCs(WorldPackets::Query::QueryQuestCompletionNPCs& queryQuestCompletionNPCs);
1655  void HandleQuestPOIQuery(WorldPackets::Query::QuestPOIQuery& questPoiQuery);
1656  void HandleViolenceLevel(WorldPackets::Misc::ViolenceLevel& violenceLevel);
1657  void HandleObjectUpdateFailedOpcode(WorldPackets::Misc::ObjectUpdateFailed& objectUpdateFailed);
1658  void HandleObjectUpdateRescuedOpcode(WorldPackets::Misc::ObjectUpdateRescued& objectUpdateRescued);
1659  void HandleRequestCategoryCooldowns(WorldPackets::Spells::RequestCategoryCooldowns& requestCategoryCooldowns);
1660 
1661  // Toys
1662  void HandleAddToy(WorldPackets::Toy::AddToy& packet);
1663  void HandleToySetFavorite(WorldPackets::Toy::ToySetFavorite& packet);
1664  void HandleUseToy(WorldPackets::Toy::UseToy& packet);
1665 
1666  // Scenes
1667  void HandleSceneTriggerEvent(WorldPackets::Scenes::SceneTriggerEvent& sceneTriggerEvent);
1668  void HandleScenePlaybackComplete(WorldPackets::Scenes::ScenePlaybackComplete& scenePlaybackComplete);
1669  void HandleScenePlaybackCanceled(WorldPackets::Scenes::ScenePlaybackCanceled& scenePlaybackCanceled);
1670 
1671  // Token
1672  void HandleUpdateListedAuctionableTokens(WorldPackets::Token::UpdateListedAuctionableTokens& updateListedAuctionableTokens);
1673  void HandleRequestWowTokenMarketPrice(WorldPackets::Token::RequestWowTokenMarketPrice& requestWowTokenMarketPrice);
1674 
1675  // Compact Unit Frames (4.x)
1676  void HandleSaveCUFProfiles(WorldPackets::Misc::SaveCUFProfiles& packet);
1677  void SendLoadCUFProfiles();
1678 
1679  // Garrison
1680  void HandleGetGarrisonInfo(WorldPackets::Garrison::GetGarrisonInfo& getGarrisonInfo);
1681  void HandleGarrisonPurchaseBuilding(WorldPackets::Garrison::GarrisonPurchaseBuilding& garrisonPurchaseBuilding);
1682  void HandleGarrisonCancelConstruction(WorldPackets::Garrison::GarrisonCancelConstruction& garrisonCancelConstruction);
1683  void HandleGarrisonRequestBlueprintAndSpecializationData(WorldPackets::Garrison::GarrisonRequestBlueprintAndSpecializationData& garrisonRequestBlueprintAndSpecializationData);
1684  void HandleGarrisonGetBuildingLandmarks(WorldPackets::Garrison::GarrisonGetBuildingLandmarks& garrisonGetBuildingLandmarks);
1685 
1686  // Battle Pets
1687  void HandleBattlePetRequestJournal(WorldPackets::BattlePet::BattlePetRequestJournal& battlePetRequestJournal);
1688  void HandleBattlePetSetBattleSlot(WorldPackets::BattlePet::BattlePetSetBattleSlot& battlePetSetBattleSlot);
1689  void HandleBattlePetModifyName(WorldPackets::BattlePet::BattlePetModifyName& battlePetModifyName);
1690  void HandleBattlePetDeletePet(WorldPackets::BattlePet::BattlePetDeletePet& battlePetDeletePet);
1691  void HandleBattlePetSetFlags(WorldPackets::BattlePet::BattlePetSetFlags& battlePetSetFlags);
1692  void HandleBattlePetSummon(WorldPackets::BattlePet::BattlePetSummon& battlePetSummon);
1693  void HandleCageBattlePet(WorldPackets::BattlePet::CageBattlePet& cageBattlePet);
1694 
1695  // Warden
1696  void HandleWardenData(WorldPackets::Warden::WardenData& packet);
1697 
1698  // Battlenet
1699  void HandleBattlenetRequest(WorldPackets::Battlenet::Request& request);
1700  void HandleBattlenetRequestRealmListTicket(WorldPackets::Battlenet::RequestRealmListTicket& requestRealmListTicket);
1701 
1702  void SendBattlenetResponse(uint32 serviceHash, uint32 methodId, uint32 token, pb::Message const* response);
1703  void SendBattlenetResponse(uint32 serviceHash, uint32 methodId, uint32 token, uint32 status);
1704  void SendBattlenetRequest(uint32 serviceHash, uint32 methodId, pb::Message const* request, std::function<void(MessageBuffer)> callback);
1705  void SendBattlenetRequest(uint32 serviceHash, uint32 methodId, pb::Message const* request);
1706 
1707  std::array<uint8, 32> const& GetRealmListSecret() const { return _realmListSecret; }
1708  void SetRealmListSecret(std::array<uint8, 32> const& secret) { memcpy(_realmListSecret.data(), secret.data(), secret.size()); }
1709 
1710  std::unordered_map<uint32, uint8> const& GetRealmCharacterCounts() const { return _realmCharacterCounts; }
1711 
1713  {
1714  struct
1715  {
1716  uint64 AccountId : 32;
1718  uint64 Key : 31;
1719  } Fields;
1720 
1722  };
1723 
1724  uint64 GetConnectToInstanceKey() const { return _instanceConnectKey.Raw; }
1725  private:
1726  void InitializeQueryCallbackParameters();
1727  void ProcessQueryCallbacks();
1728 
1745 
1746  friend class World;
1747  protected:
1749  {
1750  friend class World;
1751  public:
1753  bool EvaluateOpcode(WorldPacket& p, time_t time) const;
1754  protected:
1755  enum Policy
1756  {
1760  };
1761 
1762  uint32 GetMaxPacketCounterAllowed(uint16 opcode) const;
1763 
1765 
1766  private:
1768  typedef std::unordered_map<uint16, PacketCounter> PacketThrottlingMap;
1769  // mark this member as "mutable" so it can be modified even in const functions
1770  mutable PacketThrottlingMap _PacketThrottlingMap;
1771 
1772  DosProtection(DosProtection const& right) = delete;
1773  DosProtection& operator=(DosProtection const& right) = delete;
1774  } AntiDOS;
1775 
1776  private:
1777  // private trade methods
1778  void moveItems(Item* myItems[], Item* hisItems[]);
1779 
1780  bool CanUseBank(ObjectGuid bankerGUID = ObjectGuid::Empty) const;
1781 
1782  // logging helper
1783  void LogUnexpectedOpcode(WorldPacket* packet, const char* status, const char *reason);
1784  void LogUnprocessedTail(WorldPacket* packet);
1785 
1786  // EnumData helpers
1788  {
1789  return _legitCharacters.find(lowGUID) != _legitCharacters.end();
1790  }
1791 
1792  // this stores the GUIDs of the characters who can login
1793  // characters who failed on Player::BuildEnumData shouldn't login
1795 
1796  ObjectGuid::LowType m_GUIDLow; // set logined or recently logout player (while m_playerRecentlyLogout set)
1798  std::shared_ptr<WorldSocket> m_Socket[MAX_CONNECTION_TYPES];
1799  std::string m_Address; // Current Remote Address
1800  // std::string m_LAddress; // Last Attempted Remote Adress - we can not set attempted ip for a non-existing session!
1801 
1804  std::string _accountName;
1807  std::string _os;
1808 
1809  std::array<uint8, 32> _realmListSecret;
1810  std::unordered_map<uint32 /*realmAddress*/, uint8> _realmCharacterCounts;
1811  std::unordered_map<uint32, std::function<void(MessageBuffer)>> _battlenetResponseCallbacks;
1813 
1814  typedef std::list<AddonInfo> AddonsList;
1815 
1816  // Warden
1817  Warden* _warden; // Remains NULL if Warden system is not enabled by config
1818 
1819  time_t _logoutTime;
1820  bool m_inQueue; // session wait in auth.queue
1821  ObjectGuid m_playerLoading; // code processed in LoginPlayer
1822  bool m_playerLogout; // code processed in LogoutPlayer
1827  std::atomic<uint32> m_latency;
1828  std::atomic<uint32> m_clientTimeDelay;
1830  uint32 _tutorials[MAX_ACCOUNT_TUTORIAL_VALUES];
1832  AddonsList m_addonsList;
1833  std::vector<std::string> _registeredAddonPrefixes;
1835  uint32 recruiterId;
1839  uint32 expireTime;
1842 
1843  std::unique_ptr<BattlePetMgr> _battlePetMgr;
1844 
1845  std::unique_ptr<CollectionMgr> _collectionMgr;
1846 
1848 
1849  WorldSession(WorldSession const& right) = delete;
1850  WorldSession& operator=(WorldSession const& right) = delete;
1851 };
1852 
1853 #endif
1854 
void AddInstanceConnection(std::shared_ptr< WorldSocket > sock)
Definition: WorldSession.h:900
Definition: WorldSession.h:810
std::atomic< uint32 > m_latency
Definition: WorldSession.h:1827
Definition: WorldSession.h:1757
void format(BasicFormatter< Char > &f, const Char *&format_str, const T &value)
Definition: format.h:2963
Definition: Object.h:95
Definition: WorldSession.h:827
BarberShopResult
Definition: WorldSession.h:789
Definition: MovementPackets.h:441
Definition: CharacterPackets.h:721
Definition: GuildFinderPackets.h:220
Definition: DBCStructure.h:37
Definition: BigNumber.h:28
Warden * _warden
Definition: WorldSession.h:1817
Definition: MailPackets.h:106
Definition: LootPackets.h:108
Definition: ItemPackets.h:194
Definition: GuildPackets.h:170
Definition: EquipmentSetPackets.h:59
Definition: WorldSession.h:1759
Definition: WorldSession.h:727
Definition: EquipmentSetPackets.h:49
Definition: MovementPackets.h:296
Definition: CharacterPackets.h:592
MapSessionFilter(WorldSession *pSession)
Definition: WorldSession.h:857
Definition: WorldSession.h:821
Definition: ToyPackets.h:62
void SetRealmListSecret(std::array< uint8, 32 > const &secret)
Definition: WorldSession.h:1708
Definition: CharacterPackets.h:651
Definition: MiscPackets.h:512
Definition: BattlePetPackets.h:184
Definition: QuestPackets.h:516
PartyOperation
Definition: WorldSession.h:781
Definition: GuildPackets.h:178
Definition: QueryPackets.h:423
Definition: TaxiPackets.h:116
Definition: VehiclePackets.h:96
QueryCallback< PreparedQueryResult, std::shared_ptr< WorldPackets::Character::CharacterRenameInfo > > _charRenameCallback
Definition: WorldSession.h:1739
Definition: GarrisonPackets.h:157
Definition: Vehicle.h:32
Definition: GuildPackets.h:610
LocaleConstant m_sessionDbcLocale
Definition: WorldSession.h:1825
Definition: AuctionHousePackets.h:241
Definition: PartyPackets.h:452
Definition: LFGMgr.h:151
Definition: SpellPackets.h:282
bool isRecruiter
Definition: WorldSession.h:1836
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: ByteBuffer.h:70
time_t _logoutTime
Definition: WorldSession.h:1819
Definition: ItemPackets.h:56
int8_t int8
Definition: Define.h:148
Definition: BankPackets.h:30
ObjectGuid GetBattlenetAccountGUID() const
Definition: WorldSession.h:926
Definition: CalendarPackets.h:38
QueryCallback< PreparedQueryResult, std::shared_ptr< WorldPackets::Character::CharRaceOrFactionChangeInfo > > _charFactionChangeCallback
Definition: WorldSession.h:1741
DeclinedNameResult
Definition: WorldSession.h:825
Definition: WorldSession.h:743
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
Definition: QueryPackets.h:175
Definition: WardenPackets.h:27
Definition: SupportMgr.h:53
Definition: ItemPackets.h:309
Definition: MiscPackets.h:413
QueryCallback< PreparedQueryResult, std::string > _addFriendCallback
Definition: WorldSession.h:1734
Definition: PetitionPackets.h:95
Definition: SpellPackets.h:68
Definition: WorldSession.h:875
Definition: QuestPackets.h:30
Definition: CharacterPackets.h:641
Definition: VoicePackets.h:27
Definition: QueryPackets.h:281
Definition: PartyPackets.h:434
void SetSecurity(AccountTypes security)
Definition: WorldSession.h:931
Definition: PartyPackets.h:552
Definition: BlackMarketPackets.h:29
QueryCallback< PreparedQueryResult, bool, true > _undeleteCooldownStatusCallback
Definition: WorldSession.h:1742
Definition: QueryHolder.h:23
Definition: QuestDef.h:279
Definition: SpellPackets.h:271
Definition: GuildPackets.h:30
Definition: LFGMgr.h:161
Definition: SocialPackets.h:106
Definition: QueryPackets.h:33
ActivateTaxiReply
Definition: SharedDefines.h:4693
Definition: GuildPackets.h:540
Definition: QueryPackets.h:371
Definition: World.h:358
Definition: MiscPackets.h:724
Definition: CalendarPackets.h:399
void GetPlayerInfo(ChatHandler *handler, Player *player)
Definition: cs_lfg.cpp:27
Definition: CharacterPackets.h:672
Definition: ChatPackets.h:129
Stores information of a current vote to kick someone from a group.
Definition: LFGMgr.h:259
Definition: LootPackets.h:86
Definition: PetitionPackets.h:220
WorldSession * Session
Definition: WorldSession.h:1764
Definition: PetPackets.h:59
Definition: CalendarPackets.h:48
Definition: CharacterPackets.h:231
Definition: QuestPackets.h:404
Definition: CharacterPackets.h:65
Definition: GameObjectPackets.h:40
QueryCallback< PreparedQueryResult, std::shared_ptr< WorldPackets::Character::CharacterCreateInfo >, true > _charCreateCallback
Definition: WorldSession.h:1738
DosProtection(WorldSession *s)
Definition: WorldSession.h:1752
LocaleConstant GetSessionDbLocaleIndex() const
Definition: WorldSession.h:1060
Definition: WorldSession.h:786
Definition: GuildPackets.h:580
Definition: CalendarPackets.h:274
Definition: NPCPackets.h:244
Null(WorldPacket &&packet)
Definition: WorldSession.h:707
Definition: PartyPackets.h:43
Definition: GuildPackets.h:398
Definition: TradePackets.h:27
Definition: TalentPackets.h:85
Definition: MiscPackets.h:109
Definition: GuildPackets.h:426
Definition: WorldSession.h:725
Definition: NPCPackets.h:200
AddonsList m_addonsList
Definition: WorldSession.h:1832
Definition: MiscPackets.h:591
uint32 amountCounter
Definition: WorldSession.h:878
Definition: MiscPackets.h:261
Definition: MiscPackets.h:139
Definition: PartyPackets.h:92
bool IsLegitCharacterForAccount(ObjectGuid lowGUID)
Definition: WorldSession.h:1787
The World.
Definition: World.h:544
Definition: ItemPackets.h:393
Definition: TradePackets.h:89
Definition: WorldSession.h:775
Definition: TradePackets.h:45
Definition: ChatPackets.h:293
Definition: VoidStoragePackets.h:86
Definition: GuildFinderPackets.h:210
Definition: MiscPackets.h:324
Definition: CharacterPackets.h:506
Definition: CharacterPackets.h:59
Definition: WorldSession.h:729
Definition: SpellPackets.h:739
Definition: WorldSession.h:1748
QueryCallback< PreparedQueryResult, std::shared_ptr< WorldPackets::Character::CharacterUndeleteInfo >, true > _charUndeleteCallback
Definition: WorldSession.h:1743
void SetLogoutStartTime(time_t requestTime)
Engage the logout process for the user.
Definition: WorldSession.h:946
Spells
Definition: BattlegroundIC.h:707
Definition: SpellPackets.h:729
bool _filterAddonMessages
Definition: WorldSession.h:1834
Definition: method_options.pb.h:28
Definition: WorldSession.h:802
Definition: BattlePetPackets.h:108
Definition: MiscPackets.h:221
Definition: GuildPackets.h:985
Definition: SocialPackets.h:32
Definition: GuildPackets.h:822
Definition: BattlegroundPackets.h:306
Definition: BattlegroundPackets.h:244
Definition: CalendarPackets.h:572
Definition: MiscPackets.h:740
bool m_playerLogout
Definition: WorldSession.h:1822
Definition: InstancePackets.h:119
Definition: TaxiPackets.h:67
Definition: SpellPackets.h:654
Definition: PartyPackets.h:260
Definition: MiscPackets.h:159
Definition: ScenePackets.h:54
Definition: CalendarPackets.h:30
Definition: GuildPackets.h:196
Action
Definition: boss_balinda.cpp:38
LocaleConstant m_sessionDbLocaleIndex
Definition: WorldSession.h:1826
Definition: PetPackets.h:192
Definition: WorldSession.h:704
Definition: BattlegroundPackets.h:283
Definition: CombatPackets.h:160
Definition: BattlefieldPackets.h:68
Definition: GuildPackets.h:465
Definition: GuildFinderPackets.h:28
Definition: DuelPackets.h:28
Definition: AuctionHousePackets.h:196
Definition: MailPackets.h:195
STL namespace.
Definition: SpellPackets.h:50
Definition: AuctionHouseMgr.h:67
Definition: TaxiPackets.h:29
Definition: QuestPackets.h:275
Definition: GuildPackets.h:954
Definition: Garrison.h:83
Definition: ToyPackets.h:30
Definition: ChatPackets.h:82
ChatMsg
Definition: SharedDefines.h:4228
Definition: GuildPackets.h:942
TradeStatus
Definition: SharedDefines.h:4646
uint32 GetBattlenetAccountId() const
Definition: WorldSession.h:925
Definition: QueryPackets.h:397
Definition: WorldSession.h:865
Definition: MiscPackets.h:381
void SetInQueue(bool state)
Session in auth.queue currently.
Definition: WorldSession.h:940
Definition: GuildPackets.h:910
Definition: BnetFileGenerator.h:49
Definition: AccountMgr.h:47
Definition: WorldSession.h:805
Definition: WorldSession.h:828
Definition: CalendarPackets.h:437
Definition: DuelPackets.h:97
Definition: GuildFinderPackets.h:58
std::unordered_map< uint32, uint8 > _realmCharacterCounts
Definition: WorldSession.h:1810
std::string const & GetAccountName() const
Definition: WorldSession.h:924
Definition: MiscPackets.h:362
Definition: SpellPackets.h:31
Definition: WorldSession.h:732
void ResetTimeOutTime()
Definition: WorldSession.h:1074
Definition: RBAC.h:783
Definition: WorldSession.h:799
uint32 GetAccountId() const
Definition: WorldSession.h:922
uint64 GetConnectToInstanceKey() const
Definition: WorldSession.h:1724
char * query(struct soap *soap)
Definition: httpget.cpp:244
Definition: Creature.h:467
Definition: VehiclePackets.h:70
Definition: ReputationPackets.h:49
AccountData const * GetAccountData(AccountDataType type) const
Definition: WorldSession.h:998
Definition: GuildFinderPackets.h:173
Definition: BattlegroundPackets.h:73
Definition: PartyPackets.h:104
Definition: PartyPackets.h:213
Definition: QueryPackets.h:151
Player * GetPlayer() const
Definition: WorldSession.h:927
Definition: MovementPackets.h:317
uint8 m_expansion
Definition: WorldSession.h:1806
Definition: PartyPackets.h:273
Stores all rolecheck info of a group that wants to join.
Definition: LFGMgr.h:248
Definition: BankPackets.h:42
#define sWorld
Definition: World.h:887
Definition: ItemPackets.h:150
Definition: MailPackets.h:160
Definition: GuildPackets.h:693
LocaleConstant GetSessionDbcLocale() const
Definition: WorldSession.h:1059
Definition: ChatPackets.h:194
Definition: GuildPackets.h:715
Definition: WorldSession.h:791
Definition: TradePackets.h:79
Definition: GuildPackets.h:530
Definition: WorldSession.h:1758
Definition: SocialPackets.h:127
InstanceInfo
Definition: ConditionMgr.h:168
uint64 LowType
Definition: ObjectGuid.h:199
Definition: ItemPackets.h:426
Definition: MiscPackets.h:732
Definition: PetitionPackets.h:106
Definition: GuildPackets.h:661
Definition: ChatPackets.h:139
Definition: PartyPackets.h:377
Definition: Channel.h:126
QueryCallback< PreparedQueryResult, uint32 > _unstablePetCallback
Definition: WorldSession.h:1735
Definition: MailPackets.h:207
Definition: GarrisonPackets.h:53
CollectionMgr * GetCollectionMgr() const
Definition: WorldSession.h:1091
Definition: QueryPackets.h:121
Definition: QueryPackets.h:216
Definition: QueryPackets.h:302
Definition: QuestPackets.h:416
Definition: TicketPackets.h:94
CharacterUndeleteResult
Definition: SharedDefines.h:4522
Definition: PartyPackets.h:333
std::future< SQLQueryHolder * > QueryResultHolderFuture
Definition: QueryHolder.h:46
Definition: PetitionPackets.h:169
Definition: ItemPackets.h:182
std::unordered_map< uint16, PacketCounter > PacketThrottlingMap
Definition: WorldSession.h:1768
Definition: VehiclePackets.h:40
Definition: message.h:165
Definition: ChatPackets.h:107
CharterTypes
Definition: WorldSession.h:817
Definition: BattlegroundPackets.h:401
Definition: QuestPackets.h:393
Definition: WorldSession.h:819
Definition: GuildPackets.h:899
Definition: GuildPackets.h:454
uint32 expireTime
Definition: WorldSession.h:1839
Definition: VehiclePackets.h:108
Definition: MailPackets.h:73
Definition: SpellPackets.h:791
std::string Data
Definition: WorldSession.h:778
void Read() override
Definition: WorldSession.h:709
Definition: ScenePackets.h:43
Definition: WorldSession.h:811
Definition: PetitionPackets.h:29
Definition: GuildPackets.h:475
Definition: QueryPackets.h:321
virtual ~PacketFilter()
Definition: WorldSession.h:840
Definition: Totem.h:38
Policy _policy
Definition: WorldSession.h:1767
Definition: WorldSession.h:726
Definition: Mail.h:166
Definition: LFG.cpp:22
Definition: ClientConfigPackets.h:64
uint32 GetTutorialInt(uint8 index) const
Definition: WorldSession.h:1005
Definition: CharacterPackets.h:279
Definition: TalentPackets.h:61
Definition: GuildPackets.h:704
Definition: CharacterPackets.h:530
Definition: MiscPackets.h:342
Definition: Opcodes.h:33
Definition: QuestPackets.h:89
PacketThrottlingMap _PacketThrottlingMap
Definition: WorldSession.h:1770
Stores group data related to proposal to join.
Definition: LFGMgr.h:228
Definition: LootPackets.h:182
Definition: CharacterPackets.h:211
#define ATTR_PRINTF(F, V)
Definition: Define.h:89
Definition: CalendarPackets.h:112
Definition: Packet.h:59
Definition: Object.h:267
Definition: GuildFinderPackets.h:102
Definition: WorldSession.h:728
Definition: WorldSession.h:731
Definition: AuctionHousePackets.h:82
Definition: BattlePetPackets.h:131
Definition: TotemPackets.h:28
Definition: GuildPackets.h:739
Definition: GuildFinderPackets.h:144
Definition: CharacterPackets.h:412
QueryCallback< PreparedQueryResult, std::shared_ptr< WorldPackets::Character::CharCustomizeInfo > > _charCustomizeCallback
Definition: WorldSession.h:1740
Definition: MailPackets.h:172
LoginFailureReason
Definition: CharacterPackets.h:435
Definition: PetitionPackets.h:136
uint32 recruiterId
Definition: WorldSession.h:1835
ObjectGuid::LowType m_GUIDLow
Definition: WorldSession.h:1796
Definition: VehiclePackets.h:88
Definition: PartyPackets.h:343
Definition: WorldSession.h:794
Definition: PetitionPackets.h:179
PartyResult
Definition: SharedDefines.h:4841
Definition: BankPackets.h:54
Definition: AuctionHousePackets.h:252
Definition: PartyPackets.h:587
Definition: WorldSession.h:814
Definition: SpellPackets.h:76
time_t m_muteTime
Definition: WorldSession.h:1056
Definition: TaxiPackets.h:87
Definition: CharacterPackets.h:29
Definition: BattlenetPackets.h:84
std::string _os
Definition: WorldSession.h:1807
bool ProcessUnsafe() const override
Definition: WorldSession.h:872
LocaleConstant
Definition: Common.h:115
bool PlayerLogoutWithSave() const
Definition: WorldSession.h:891
Definition: ItemPackets.h:67
virtual bool ProcessUnsafe() const
Definition: WorldSession.h:843
Definition: PetPackets.h:205
QueryResultHolderFuture _charLoginCallback
Definition: WorldSession.h:1744
Definition: CalendarPackets.h:423
Definition: TalentPackets.h:51
Definition: WhoPackets.h:29
Definition: LootMgr.h:314
Definition: TradePackets.h:100
ObjectGuid m_playerLoading
Definition: WorldSession.h:1821
Definition: ItemPackets.h:505
uint8 GetExpansion() const
Definition: WorldSession.h:934
G3D::int16 z
Definition: Vector3int16.h:46
Definition: WorldSession.h:784
Definition: BattlenetPackets.h:95
Definition: BattlegroundPackets.h:236
ObjectGuid m_currentBankerGUID
Definition: WorldSession.h:1841
Definition: LootPackets.h:147
Definition: EquipmentSetPackets.h:69
Definition: BattlegroundPackets.h:81
Definition: BattlegroundPackets.h:314
Definition: BattlefieldPackets.h:40
Definition: Unit.h:409
Definition: Warden.h:95
Definition: NPCPackets.h:83
Definition: Item.h:259
uint64 Raw
Definition: WorldSession.h:1721
Definition: SpellPackets.h:747
Definition: InspectPackets.h:107
ResponseCodes
Definition: SharedDefines.h:4422
std::atomic< int32 > m_timeOutTime
Definition: WorldSession.h:1067
Definition: WorldSocket.h:70
Definition: MiscPackets.h:581
Definition: CharacterPackets.h:661
Definition: WorldSession.h:812
std::array< uint8, 32 > _realmListSecret
Definition: WorldSession.h:1809
Vector2int16 & operator=(const Any &a)
int32_t int32
Definition: Define.h:146
std::string const & GetRemoteAddress() const
Definition: WorldSession.h:932
Definition: WorldSession.h:792
Achievement
Definition: boss_loatheb.cpp:52
Definition: ChatPackets.h:230
BattlePetMgr * GetBattlePetMgr() const
Definition: WorldSession.h:1089
Definition: BattlegroundPackets.h:226
uint32_t uint32
Definition: Define.h:150
Definition: PetPackets.h:49
AccountTypes
Definition: Common.h:106
uint32 _battlenetRequestToken
Definition: WorldSession.h:1812
uint64_t uint64
Definition: Define.h:149
Definition: Battlefield.h:196
Definition: TicketPackets.h:237
Definition: TradePackets.h:71
G3D::int16 y
Definition: Vector2int16.h:38
Definition: PartyPackets.h:442
Definition: GuildPackets.h:572
Definition: ScenePackets.h:64
uint16_t uint16
Definition: Define.h:151
Definition: ChannelPackets.h:139
Definition: GuildPackets.h:590
Definition: ItemPackets.h:256
Definition: GameObject.h:880
Definition: QueryPackets.h:82
Definition: PartyPackets.h:224
Definition: BattlePetPackets.h:153
Definition: ItemPackets.h:479
AccountDataType
Definition: WorldSession.h:723
Definition: PetPackets.h:31
Definition: TradePackets.h:53
ChatRestrictionType
Definition: WorldSession.h:808
Definition: AuctionHousePackets.h:182
Definition: GuildPackets.h:310
Definition: MailPackets.h:95
bool IsARecruiter() const
Definition: WorldSession.h:1086
Definition: WorldSession.h:783
Definition: PartyPackets.h:365
Definition: Opcodes.h:32
Definition: MiscPackets.h:805
Definition: MiscPackets.h:352
Definition: Spell.h:170
Definition: InstanceSaveMgr.h:44
Definition: ChannelPackets.h:180
AccountTypes _security
Definition: WorldSession.h:1802
QueryCallback< PreparedQueryResult, ObjectGuid > _sendStabledPetCallback
Definition: WorldSession.h:1737
Definition: VehiclePackets.h:119
Definition: NPCPackets.h:220
Definition: BattlePetPackets.h:119
Definition: MovementPackets.h:35
Definition: TradePackets.h:61
Definition: TradePackets.h:110
Definition: inftrees.h:24
bool m_playerRecentlyLogout
Definition: WorldSession.h:1823
Definition: MovementPackets.h:408
Definition: TradePackets.h:122
Definition: BattlegroundMgr.h:57
Definition: ChannelPackets.h:194
std::unique_ptr< CollectionMgr > _collectionMgr
Definition: WorldSession.h:1845
void UpdateTimeOutTime(uint32 diff)
Definition: WorldSession.h:1069
Definition: LootMgr.h:157
Definition: CharacterPackets.h:363
uint32 GetLatency() const
Definition: WorldSession.h:1063
Definition: PartyPackets.h:126
std::unique_ptr< BattlePetMgr > _battlePetMgr
Definition: WorldSession.h:1843
Definition: WorldSession.h:785
Definition: ClientConfigPackets.h:103
Definition: BattlePetMgr.h:83
Definition: LFGMgr.h:197
Definition: BattlegroundPackets.h:255
Definition: GuildPackets.h:728
Definition: GuildPackets.h:600
Definition: ItemPackets.h:271
uint32 _accountId
Definition: WorldSession.h:1803
void SetTutorialInt(uint8 index, uint32 value)
Definition: WorldSession.h:1006
Definition: ChatPackets.h:119
Definition: TradePackets.h:130
std::future< PreparedQueryResult > PreparedQueryResultFuture
Definition: Callback.h:26
Definition: SpellPackets.h:665
uint32 GetRecruiterId() const
Definition: WorldSession.h:1085
Definition: TicketPackets.h:36
Definition: GuildPackets.h:770
Definition: GuildPackets.h:148
Definition: ReferAFriendPackets.h:28
GuidSet _legitCharacters
Definition: WorldSession.h:1794
Definition: SocialPackets.h:137
std::string m_Address
Definition: WorldSession.h:1799
std::vector< std::string > _registeredAddonPrefixes
Definition: WorldSession.h:1833
Definition: AuctionHousePackets.h:147
uint32 _battlenetAccountId
Definition: WorldSession.h:1805
Definition: SpellPackets.h:60
Definition: ItemTemplate.h:647
Definition: WorldSession.h:803
Definition: CharacterPackets.h:40
bool PlayerRecentlyLoggedOut() const
Definition: WorldSession.h:892
Definition: CharacterPackets.h:347
Definition: PartyPackets.h:575
ConnectToKey _instanceConnectKey
Definition: WorldSession.h:1847
Definition: WorldSession.h:793
Player * _player
Definition: WorldSession.h:1797
void SetLatency(uint32 latency)
Definition: WorldSession.h:1064
Definition: LootPackets.h:118
Definition: WorldSession.h:730
Definition: MiscPackets.h:621
Definition: AchievementPackets.h:173
Definition: BattlePetPackets.h:141
PreparedQueryResultFuture _stablePetCallback
Definition: WorldSession.h:1732
Definition: CharacterPackets.h:490
Definition: SocialPackets.h:95
Definition: WorldSession.h:836
Definition: GuildFinderPackets.h:112
Definition: MiscPackets.h:750
Definition: GuildPackets.h:186
Definition: VoicePackets.h:38
std::set< ObjectGuid > GuidSet
Definition: ObjectGuid.h:332
void ResetClientTimeDelay()
Definition: WorldSession.h:1065
LockedQueue< WorldPacket * > _recvQueue
Definition: WorldSession.h:1837
QueryCallback< PreparedQueryResult, uint32 > _stableSwapCallback
Definition: WorldSession.h:1736
Definition: ItemPackets.h:495
Definition: SpellPackets.h:145
Definition: CalendarPackets.h:101
Definition: CalendarPackets.h:410
time_t lastReceiveTime
Definition: WorldSession.h:877
Definition: TradePackets.h:37
#define TC_GAME_API
Definition: Define.h:134
Definition: MovementPackets.h:419
Definition: World.h:217
PreparedQueryResultFuture _addIgnoreCallback
Definition: WorldSession.h:1731
Definition: PartyPackets.h:400
bool PlayerLogout() const
Definition: WorldSession.h:890
Definition: AuctionHousePackets.h:127
Definition: InspectPackets.h:30
PacketFilter(WorldSession *pSession)
Definition: WorldSession.h:839
Definition: PartyPackets.h:563
Definition: MiscPackets.h:775
Definition: ItemPackets.h:283
Definition: MovementPackets.h:306
Definition: PetPackets.h:182
int32_t int32
Definition: g3dmath.h:167
Definition: QuestPackets.h:487
Definition: VehiclePackets.h:129
Definition: WorldSession.h:813
Definition: MovementPackets.h:278
Definition: PartyPackets.h:250
Definition: SpellPackets.h:261
uint8_t uint8
Definition: Define.h:152
Definition: CombatPackets.h:50
Definition: CharacterPackets.h:572
Definition: VoidStoragePackets.h:38
Definition: GuildPackets.h:84
#define MAX_ACCOUNT_TUTORIAL_VALUES
Definition: WorldSession.h:773
std::string const & GetOS() const
Definition: WorldSession.h:935
Definition: MiscPackets.h:629
Definition: CharacterPackets.h:178
Definition: LFGMgr.h:176
Definition: MiscPackets.h:613
bool isLogingOut() const
Is the user engaged in a log out process?
Definition: WorldSession.h:943
Definition: PetitionPackets.h:74
Definition: MiscPackets.h:649
Definition: BattlegroundPackets.h:393
Definition: AuctionHousePackets.h:171
Definition: CalendarPackets.h:260
Definition: CharacterPackets.h:461
Definition: VoidStoragePackets.h:48
Definition: QuestPackets.h:561
Definition: BnetFileGenerator.h:47
Definition: Battleground.h:235
Definition: ToyPackets.h:40
Definition: QuestPackets.h:79
Definition: PartyPackets.h:297
Definition: ItemPackets.h:297
QueryCallback< PreparedQueryResult, bool > _charEnumCallback
Definition: WorldSession.h:1733
ConnectToSerial
Definition: AuthenticationPackets.h:134
Definition: WorldSession.h:822
Definition: BattlePetPackets.h:77
const FieldDescriptor value
Definition: descriptor.h:1522
Definition: LootPackets.h:29
Definition: CharacterHandler.cpp:58
Definition: WorldSession.h:744
Definition: MailPackets.h:183
NPC
Definition: boss_razorscale.cpp:78
Player session in the World.
Definition: WorldSession.h:882
Definition: ItemPackets.h:436
Definition: ObjectGuid.h:189
#define const
Definition: zconf.h:217
bool m_inQueue
Definition: WorldSession.h:1820
~WorldSessionFilter()
Definition: WorldSession.h:869
G3D::int16 x
Definition: Vector2int16.h:37
Definition: SocialPackets.h:116
Definition: MailPackets.h:149
Definition: Unit.h:1101
Definition: ReferAFriendPackets.h:38
Definition: ChatPackets.h:52
bool forceExit
Definition: WorldSession.h:1840
Definition: MovementPackets.h:218
Definition: CharacterPackets.h:582
Definition: GuildPackets.h:638
Definition: VehiclePackets.h:80
Misc
Definition: boss_occuthar.cpp:48
Definition: VoidStoragePackets.h:109
std::unordered_map< uint32, std::function< void(MessageBuffer)> > _battlenetResponseCallbacks
Definition: WorldSession.h:1811
BFLeaveReason
Definition: WorldSession.h:797
Definition: WorldSession.h:820
std::atomic< uint32 > m_clientTimeDelay
Definition: WorldSession.h:1828
Definition: TicketPackets.h:54
QueryResultHolderFuture _accountLoginCallback
Definition: WorldSession.h:1730
Definition: QuestPackets.h:428
Definition: WorldSession.h:1712
Definition: Guild.h:320
Definition: NPCPackets.h:38
Definition: PetPackets.h:69
Definition: Unit.h:1305
Definition: MovementPackets.h:395
WorldSessionFilter(WorldSession *pSession)
Definition: WorldSession.h:868
Definition: MiscPackets.h:271
Definition: CalendarPackets.h:124
Definition: TicketPackets.h:196
Definition: GuildPackets.h:845
bool PlayerLoading() const
Definition: WorldSession.h:889
Definition: ChatPackets.h:40
rbac::RBACData * _RBACData
Definition: WorldSession.h:1838
Definition: PetitionPackets.h:199
Definition: ChatPackets.h:65
Policy
Definition: WorldSession.h:1755
Definition: CollectionMgr.h:48
Definition: InspectPackets.h:83
bool ShouldLogOut(time_t currTime) const
Is logout cooldown expired?
Definition: WorldSession.h:952
std::array< uint8, 32 > const & GetRealmListSecret() const
Definition: WorldSession.h:1707
#define NUM_ACCOUNT_DATA_TYPES
Definition: WorldSession.h:735
Definition: CalendarPackets.h:78
Definition: PartyPackets.h:353
Definition: WorldPacket.h:26
Definition: AuctionHousePackets.h:159
Definition: BattlefieldPackets.h:94
Definition: BattlegroundPackets.h:52
Definition: GameObjectPackets.h:30
Definition: MiscPackets.h:190
Definition: ItemPackets.h:321
Definition: WorldSession.h:804
Definition: PetPackets.h:41
bool IsConnectionIdle() const
Definition: WorldSession.h:1079
Definition: WorldSession.h:854
Definition: WorldSession.h:742
Definition: InspectPackets.h:141
Definition: MessageBuffer.h:24
std::list< AddonInfo > AddonsList
Definition: WorldSession.h:1814
std::unordered_map< uint32, uint8 > const & GetRealmCharacterCounts() const
Definition: WorldSession.h:1710
WorldSession *const m_pSession
Definition: WorldSession.h:846
Definition: GuildPackets.h:443
uint32 getIntConfig(WorldIntConfigs index) const
Get a server configuration element (see #WorldConfigs)
Definition: World.h:707
ConnectionType
Definition: Opcodes.h:29
Definition: CharacterPackets.h:562
bool _tutorialsChanged
Definition: WorldSession.h:1831
Definition: Pet.h:46
void Update(uint32 diff)
Definition: WeatherMgr.cpp:150
Definition: SpellPackets.h:854
~MapSessionFilter()
Definition: WorldSession.h:858
Definition: AreaTrigger.h:26
Definition: MiscPackets.h:249
Definition: GuildPackets.h:878
Definition: CombatPackets.h:29
VoidTransferError
Definition: SharedDefines.h:4825
ObjectGuid GetAccountGUID() const
Definition: WorldSession.h:923
Definition: BattlegroundPackets.h:42
Definition: InstancePackets.h:72
std::string _accountName
Definition: WorldSession.h:1804
Definition: SpellPackets.h:42
Definition: ItemPackets.h:334
Definition: CalendarPackets.h:391
Definition: CharacterPackets.h:257
bool m_playerSave
Definition: WorldSession.h:1824
Definition: BattlegroundPackets.h:213
Definition: VehiclePackets.h:139
Definition: QuestPackets.h:305
Definition: WhoPackets.h:78
Definition: ItemPackets.h:108
TutorialAction
Definition: WorldSession.h:740
Definition: CharacterPackets.h:540
std::shared_ptr< Transaction > SQLTransaction
Definition: Transaction.h:58
QueryResultHolderFuture _realmAccountLoginCallback
Definition: WorldSession.h:1729
Definition: CharacterPackets.h:91