diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2013-11-25 21:43:43 +0100 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2013-11-25 21:43:43 +0100 |
commit | 18b5ccbc0836dbfb4adcff76dbfbde340bcabbc1 (patch) | |
tree | eb095118736e4c61c93e309dbc560cae56aad134 /source/Mobs/Monster.cpp | |
parent | Added cWorld::SpawnExperienceOrb function. (diff) | |
download | cuberite-18b5ccbc0836dbfb4adcff76dbfbde340bcabbc1.tar cuberite-18b5ccbc0836dbfb4adcff76dbfbde340bcabbc1.tar.gz cuberite-18b5ccbc0836dbfb4adcff76dbfbde340bcabbc1.tar.bz2 cuberite-18b5ccbc0836dbfb4adcff76dbfbde340bcabbc1.tar.lz cuberite-18b5ccbc0836dbfb4adcff76dbfbde340bcabbc1.tar.xz cuberite-18b5ccbc0836dbfb4adcff76dbfbde340bcabbc1.tar.zst cuberite-18b5ccbc0836dbfb4adcff76dbfbde340bcabbc1.zip |
Diffstat (limited to 'source/Mobs/Monster.cpp')
-rw-r--r-- | source/Mobs/Monster.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source/Mobs/Monster.cpp b/source/Mobs/Monster.cpp index a74881978..091623c8a 100644 --- a/source/Mobs/Monster.cpp +++ b/source/Mobs/Monster.cpp @@ -259,7 +259,7 @@ void cMonster::KilledBy(cEntity * a_Killer) { m_World->BroadcastSoundEffect(m_SoundDeath, (int)(GetPosX() * 8), (int)(GetPosY() * 8), (int)(GetPosZ() * 8), 1.0f, 0.8f); } - int Exp; + int Reward; switch (m_MobType) { // Animals @@ -273,7 +273,7 @@ void cMonster::KilledBy(cEntity * a_Killer) case cMonster::mtOcelot: case cMonster::mtWolf: { - Exp = m_World->GetTickRandomNumber(2) + 1; + Reward = m_World->GetTickRandomNumber(2) + 1; } // Monsters @@ -290,25 +290,29 @@ void cMonster::KilledBy(cEntity * a_Killer) case cMonster::mtSlime: case cMonster::mtMagmaCube: { - Exp = 6 + (m_World->GetTickRandomNumber(2)); + Reward = 6 + (m_World->GetTickRandomNumber(2)); + } + case cMonster::mtBlaze: + { + Reward = 10; } // Bosses case cMonster::mtEnderDragon: { - Exp = 12000; + Reward = 12000; } case cMonster::mtWither: { - Exp = 50; + Reward = 50; } default: { - Exp = 0; + Reward = 0; } } - m_World->SpawnExperienceOrb(GetPosX(), GetPosY(), GetPosZ(), Exp); + m_World->SpawnExperienceOrb(GetPosX(), GetPosY(), GetPosZ(), Reward); m_DestroyTimer = 0; } |