TrinityCore
Loading...
Searching...
No Matches
Account.h
Go to the documentation of this file.
1/*
2* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3*
4* This program is free software; you can redistribute it and/or modify it
5* under the terms of the GNU General Public License as published by the
6* Free Software Foundation; either version 2 of the License, or (at your
7* option) any later version.
8*
9* This program is distributed in the hope that it will be useful, but WITHOUT
10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12* more details.
13*
14* You should have received a copy of the GNU General Public License along
15* with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef TRINITYCORE_ACCOUNT_H
19#define TRINITYCORE_ACCOUNT_H
20
21#include "BaseEntity.h"
22
23class WorldSession;
24
25namespace Battlenet
26{
27class Account final : public BaseEntity
28{
29public:
30 explicit Account(WorldSession* session, ObjectGuid guid, std::string&& name);
31
32 std::string GetNameForLocaleIdx(LocaleConstant locale) const override;
33
34 void BuildUpdate(UpdateDataMapType& data_map) override;
35
36 std::string GetDebugInfo() const override;
37
39
40protected:
41 UF::UpdateFieldFlag GetUpdateFieldFlagsFor(Player const* target) const override;
42
43 bool AddToObjectUpdate() override;
44 void RemoveFromObjectUpdate() override;
45
46private:
48 std::string m_name;
49};
50}
51
52#endif // TRINITYCORE_ACCOUNT_H
std::unordered_map< Player *, UpdateData > UpdateDataMapType
Definition BaseEntity.h:32
LocaleConstant
Definition Common.h:51
int32_t int32
Definition Define.h:150
std::string m_name
Definition Account.h:48
UF::UpdateField< UF::HousingStorageData, int32(WowCS::EntityFragment::FHousingStorage_C), 0 > m_housingStorageData
Definition Account.h:38
bool AddToObjectUpdate() override
Definition Account.cpp:64
std::string GetDebugInfo() const override
Definition Account.cpp:51
WorldSession * m_session
Definition Account.h:47
void BuildUpdate(UpdateDataMapType &data_map) override
Definition Account.cpp:41
void RemoveFromObjectUpdate() override
Definition Account.cpp:75
std::string GetNameForLocaleIdx(LocaleConstant locale) const override
Definition Account.cpp:36
UF::UpdateFieldFlag GetUpdateFieldFlagsFor(Player const *target) const override
Definition Account.cpp:56
Player session in the World.
UpdateFieldFlag
Definition UpdateField.h:37