summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Ghast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/Ghast.cpp')
-rw-r--r--src/Mobs/Ghast.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/src/Mobs/Ghast.cpp b/src/Mobs/Ghast.cpp
index 3b20bea28..39fc2e99b 100644
--- a/src/Mobs/Ghast.cpp
+++ b/src/Mobs/Ghast.cpp
@@ -22,21 +22,6 @@ cGhast::cGhast(void) :
-void cGhast::GetDrops(cItems & a_Drops, cEntity * a_Killer)
-{
- unsigned int LootingLevel = 0;
- if (a_Killer != nullptr)
- {
- LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
- }
- AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_GUNPOWDER);
- AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_GHAST_TEAR);
-}
-
-
-
-
-
bool cGhast::Attack(std::chrono::milliseconds a_Dt)
{
if ((GetTarget() != nullptr) && (m_AttackCoolDownTicksLeft == 0) && (!m_IsCharging))
@@ -71,6 +56,21 @@ bool cGhast::DoTakeDamage(TakeDamageInfo & a_TDI)
+void cGhast::GetDrops(cItems & a_Drops, cEntity * a_Killer)
+{
+ unsigned int LootingLevel = 0;
+ if (a_Killer != nullptr)
+ {
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
+ }
+ AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_GUNPOWDER);
+ AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_GHAST_TEAR);
+}
+
+
+
+
+
void cGhast::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
Super::Tick(a_Dt, a_Chunk);
@@ -113,5 +113,3 @@ void cGhast::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
AddSpeed(SpeedVector);
}
}
-
-