summaryrefslogtreecommitdiffstats
path: root/src/Mobs/NewEnderman.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mobs/NewEnderman.cpp')
-rw-r--r--src/Mobs/NewEnderman.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/Mobs/NewEnderman.cpp b/src/Mobs/NewEnderman.cpp
new file mode 100644
index 000000000..5a61265d7
--- /dev/null
+++ b/src/Mobs/NewEnderman.cpp
@@ -0,0 +1,32 @@
+
+#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
+
+#include "NewEnderman.h"
+#include "../Entities/Player.h"
+#include "../Tracer.h"
+
+
+
+
+
+cNewEnderman::cNewEnderman(void) :
+ super("Enderman", mtEnderman, "mob.endermen.hit", "mob.endermen.death", 0.5, 2.9),
+ m_bIsScreaming(false),
+ CarriedBlock(E_BLOCK_AIR),
+ CarriedMeta(0)
+{
+}
+
+
+
+
+
+void cNewEnderman::GetDrops(cItems & a_Drops, cEntity * a_Killer)
+{
+ int LootingLevel = 0;
+ if (a_Killer != NULL)
+ {
+ LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
+ }
+ AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_ENDER_PEARL);
+}