ManaPlus
src
resources
dbmanager.cpp
Go to the documentation of this file.
1
/*
2
* The ManaPlus Client
3
* Copyright (C) 2017-2019 The ManaPlus Developers
4
* Copyright (C) 2019-2021 Andrei Karas
5
*
6
* This file is part of The ManaPlus Client.
7
*
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
22
#include "
resources/dbmanager.h
"
23
24
#include "
being/being.h
"
25
26
#include "
net/loginhandler.h
"
27
#include "net/net.h"
28
29
#include "
resources/db/avatardb.h
"
30
#include "
resources/db/badgesdb.h
"
31
#include "
resources/db/chardb.h
"
32
#include "
resources/db/clandb.h
"
33
#include "
resources/db/colordb.h
"
34
#include "
resources/db/deaddb.h
"
35
#include "
resources/db/elementaldb.h
"
36
#include "
resources/db/emotedb.h
"
37
#include "
resources/db/groupdb.h
"
38
#include "
resources/db/homunculusdb.h
"
39
#include "
resources/db/horsedb.h
"
40
#include "
resources/db/itemdb.h
"
41
#include "
resources/db/itemfielddb.h
"
42
#include "
resources/db/itemoptiondb.h
"
43
#include "
resources/db/languagedb.h
"
44
#include "
resources/db/sounddb.h
"
45
#include "
resources/db/mapdb.h
"
46
#include "
resources/db/mercenarydb.h
"
47
#include "
resources/db/moddb.h
"
48
#include "
resources/db/monsterdb.h
"
49
#include "
resources/db/networkdb.h
"
50
#include "
resources/db/npcdb.h
"
51
#include "
resources/db/npcdialogdb.h
"
52
#include "
resources/db/palettedb.h
"
53
#include "
resources/db/petdb.h
"
54
#include "
resources/db/skillunitdb.h
"
55
#include "
resources/db/statdb.h
"
56
#include "
resources/db/statuseffectdb.h
"
57
#include "
resources/db/textdb.h
"
58
#include "
resources/db/unitsdb.h
"
59
#include "
resources/db/weaponsdb.h
"
60
61
#include "
debug.h
"
62
63
void
DbManager::loadDb
()
64
{
65
CharDB::load
();
66
GroupDb::load
();
67
StatDb::load
();
68
DeadDB::load
();
69
PaletteDB::load
();
70
ColorDB::load
();
71
SoundDB::load
();
72
LanguageDb::load
();
73
TextDb::load
();
74
MapDB::load
();
75
ItemFieldDb::load
();
76
ItemOptionDb::load
();
77
ItemDB::load
();
78
Being::load
();
79
const
ServerTypeT
type =
Net::getNetworkType
();
80
if
(type ==
ServerType::EATHENA
||
81
type ==
ServerType::EVOL2
)
82
{
83
NetworkDb::load
();
84
if
(
loginHandler
!=
nullptr
)
85
loginHandler
->
updatePacketVersion
();
86
MercenaryDB::load
();
87
HomunculusDB::load
();
88
ElementalDb::load
();
89
SkillUnitDb::load
();
90
HorseDB::load
();
91
ClanDb::load
();
92
}
93
MonsterDB::load
();
94
AvatarDB::load
();
95
BadgesDB::load
();
96
WeaponsDB::load
();
97
UnitsDb::load
();
98
NPCDB::load
();
99
NpcDialogDB::load
();
100
PETDB::load
();
101
EmoteDB::load
();
102
// ModDB::load();
103
StatusEffectDB::load
();
104
}
105
106
void
DbManager::unloadDb
()
107
{
108
CharDB::unload
();
109
GroupDb::unload
();
110
StatDb::unload
();
111
DeadDB::unload
();
112
ColorDB::unload
();
113
SoundDB::unload
();
114
LanguageDb::unload
();
115
TextDb::unload
();
116
EmoteDB::unload
();
117
ItemDB::unload
();
118
ItemOptionDb::unload
();
119
ItemFieldDb::unload
();
120
const
ServerTypeT
type =
Net::getNetworkType
();
121
if
(type ==
ServerType::EATHENA
||
122
type ==
ServerType::EVOL2
)
123
{
124
MercenaryDB::unload
();
125
HomunculusDB::unload
();
126
ClanDb::unload
();
127
ElementalDb::unload
();
128
SkillUnitDb::unload
();
129
HorseDB::unload
();
130
NetworkDb::unload
();
131
}
132
MonsterDB::unload
();
133
NPCDB::unload
();
134
NpcDialogDB::unload
();
135
AvatarDB::unload
();
136
BadgesDB::unload
();
137
WeaponsDB::unload
();
138
UnitsDb::unload
();
139
PaletteDB::unload
();
140
PETDB::unload
();
141
StatusEffectDB::unload
();
142
ModDB::unload
();
143
}
avatardb.h
badgesdb.h
being.h
chardb.h
clandb.h
ActorSprite::load
static void load()
Definition:
actorsprite.cpp:435
Net::LoginHandler::updatePacketVersion
virtual void updatePacketVersion() const =0
colordb.h
dbmanager.h
deaddb.h
debug.h
elementaldb.h
emotedb.h
groupdb.h
homunculusdb.h
horsedb.h
itemdb.h
itemfielddb.h
itemoptiondb.h
languagedb.h
loginhandler.h
loginHandler
Net::LoginHandler * loginHandler
Definition:
net.cpp:90
mapdb.h
mercenarydb.h
moddb.h
monsterdb.h
AvatarDB::load
void load()
Definition:
avatardb.cpp:46
AvatarDB::unload
void unload()
Definition:
avatardb.cpp:133
BadgesDB::unload
void unload()
Definition:
badgesdb.cpp:86
BadgesDB::load
void load()
Definition:
badgesdb.cpp:74
CharDB::unload
void unload()
Definition:
chardb.cpp:125
CharDB::load
void load()
Definition:
chardb.cpp:47
ClanDb::load
void load()
Definition:
clandb.cpp:46
ClanDb::unload
void unload()
Definition:
clandb.cpp:113
ColorDB::unload
void unload()
Definition:
colordb.cpp:182
ColorDB::load
void load()
Definition:
colordb.cpp:42
DbManager::loadDb
void loadDb()
Definition:
dbmanager.cpp:63
DbManager::unloadDb
void unloadDb()
Definition:
dbmanager.cpp:106
DeadDB::unload
void unload()
Definition:
deaddb.cpp:96
DeadDB::load
void load()
Definition:
deaddb.cpp:39
ElementalDb::unload
void unload()
Definition:
elementaldb.cpp:128
ElementalDb::load
void load()
Definition:
elementaldb.cpp:42
EmoteDB::load
void load()
Definition:
emotedb.cpp:48
EmoteDB::unload
void unload()
Definition:
emotedb.cpp:227
GroupDb::load
void load()
Definition:
groupdb.cpp:46
GroupDb::unload
void unload()
Definition:
groupdb.cpp:333
HomunculusDB::unload
void unload()
Definition:
homunculusdb.cpp:135
HomunculusDB::load
void load()
Definition:
homunculusdb.cpp:43
HorseDB::unload
void unload()
Definition:
horsedb.cpp:266
HorseDB::load
void load()
Definition:
horsedb.cpp:60
ItemDB::load
void load()
Definition:
itemdb.cpp:147
ItemDB::unload
void unload()
Definition:
itemdb.cpp:759
ItemFieldDb::unload
void unload()
Definition:
itemfielddb.cpp:135
ItemFieldDb::load
void load()
Definition:
itemfielddb.cpp:42
ItemOptionDb::unload
void unload()
Definition:
itemoptiondb.cpp:139
ItemOptionDb::load
void load()
Definition:
itemoptiondb.cpp:41
LanguageDb::load
void load()
Definition:
languagedb.cpp:40
LanguageDb::unload
void unload()
Definition:
languagedb.cpp:104
MapDB::load
void load()
Definition:
mapdb.cpp:47
MercenaryDB::load
void load()
Definition:
mercenarydb.cpp:43
MercenaryDB::unload
void unload()
Definition:
mercenarydb.cpp:132
ModDB::unload
void unload()
Definition:
moddb.cpp:100
MonsterDB::load
void load()
Definition:
monsterdb.cpp:47
MonsterDB::unload
void unload()
Definition:
monsterdb.cpp:135
NPCDB::load
void load()
Definition:
npcdb.cpp:48
NPCDB::unload
void unload()
Definition:
npcdb.cpp:179
Net::getNetworkType
ServerTypeT getNetworkType()
Definition:
net.cpp:189
NetworkDb::load
void load()
Definition:
networkdb.cpp:40
NetworkDb::unload
void unload()
Definition:
networkdb.cpp:73
NpcDialogDB::unload
void unload()
Definition:
npcdialogdb.cpp:207
NpcDialogDB::load
void load()
Definition:
npcdialogdb.cpp:40
PETDB::load
void load()
Definition:
petdb.cpp:45
PETDB::unload
void unload()
Definition:
petdb.cpp:148
PaletteDB::unload
void unload()
Definition:
palettedb.cpp:103
PaletteDB::load
void load()
Definition:
palettedb.cpp:40
ServerType::EVOL2
@ EVOL2
Definition:
servertype.h:34
ServerType::EATHENA
@ EATHENA
Definition:
servertype.h:33
SkillUnitDb::load
void load()
Definition:
skillunitdb.cpp:45
SkillUnitDb::unload
void unload()
Definition:
skillunitdb.cpp:141
SoundDB::unload
void unload()
Definition:
sounddb.cpp:87
SoundDB::load
void load()
Definition:
sounddb.cpp:40
StatDb::load
void load()
Definition:
statdb.cpp:87
StatDb::unload
void unload()
Definition:
statdb.cpp:228
StatusEffectDB::load
void load()
Definition:
statuseffectdb.cpp:60
StatusEffectDB::unload
void unload()
Definition:
statuseffectdb.cpp:189
TextDb::load
void load()
Definition:
textdb.cpp:37
TextDb::unload
void unload()
Definition:
textdb.cpp:86
UnitsDb::load
void load()
Definition:
unitsdb.cpp:73
UnitsDb::unload
void unload()
Definition:
unitsdb.cpp:120
WeaponsDB::load
void load()
Definition:
weaponsdb.cpp:51
WeaponsDB::unload
void unload()
Definition:
weaponsdb.cpp:63
networkdb.h
npcdb.h
npcdialogdb.h
palettedb.h
petdb.h
ServerTypeT
ServerType ::T ServerTypeT
Definition:
servertype.h:36
skillunitdb.h
sounddb.h
statdb.h
statuseffectdb.h
textdb.h
unitsdb.h
weaponsdb.h
Generated on Wed Mar 17 2021 19:19:09 for ManaPlus by
1.9.1