Cuberite
A lightweight, fast and extensible game server for Minecraft
src
MobFamilyCollecter.cpp
Go to the documentation of this file.
1
2
#include "
Globals.h
"
// NOTE: MSVC stupidness requires this to be the same across all modules
3
4
#include "
MobFamilyCollecter.h
"
5
6
7
8
9
10
void
cMobFamilyCollecter::CollectMob
(
cMonster
& a_Monster)
11
{
12
cMonster::eFamily
MobFamily = a_Monster.
GetMobFamily
();
13
m_Mobs
[MobFamily].insert(&a_Monster);
14
}
15
16
17
18
19
20
int
cMobFamilyCollecter::GetNumberOfCollectedMobs
(
cMonster::eFamily
a_Family)
21
{
22
return
static_cast<
int
>
(
m_Mobs
[a_Family].size());
23
}
24
25
26
27
Globals.h
MobFamilyCollecter.h
cMobFamilyCollecter::GetNumberOfCollectedMobs
int GetNumberOfCollectedMobs(cMonster::eFamily a_Family)
Definition:
MobFamilyCollecter.cpp:20
cMobFamilyCollecter::CollectMob
void CollectMob(cMonster &a_Monster)
Definition:
MobFamilyCollecter.cpp:10
cMobFamilyCollecter::m_Mobs
std::map< cMonster::eFamily, std::set< cMonster * > > m_Mobs
Definition:
MobFamilyCollecter.h:24
cMonster
Definition:
Monster.h:18
cMonster::GetMobFamily
eFamily GetMobFamily(void) const
Definition:
Monster.cpp:1714
cMonster::eFamily
eFamily
Definition:
Monster.h:29
Generated on Fri Oct 25 2024 05:01:15 for Cuberite by
1.9.1