diff options
author | luksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-01 11:56:47 +0100 |
---|---|---|
committer | luksor111@gmail.com <luksor111@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-11-01 11:56:47 +0100 |
commit | 77064aa486822be1ba593e171725c811e6987981 (patch) | |
tree | d55e4fb8d15aedc31c6fe605cd8637f24e91624f /source/Mobs/Witch.cpp | |
parent | Pickups no longer crash clients. (diff) | |
download | cuberite-77064aa486822be1ba593e171725c811e6987981.tar cuberite-77064aa486822be1ba593e171725c811e6987981.tar.gz cuberite-77064aa486822be1ba593e171725c811e6987981.tar.bz2 cuberite-77064aa486822be1ba593e171725c811e6987981.tar.lz cuberite-77064aa486822be1ba593e171725c811e6987981.tar.xz cuberite-77064aa486822be1ba593e171725c811e6987981.tar.zst cuberite-77064aa486822be1ba593e171725c811e6987981.zip |
Diffstat (limited to 'source/Mobs/Witch.cpp')
-rw-r--r-- | source/Mobs/Witch.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/source/Mobs/Witch.cpp b/source/Mobs/Witch.cpp new file mode 100644 index 000000000..02d1de4fe --- /dev/null +++ b/source/Mobs/Witch.cpp @@ -0,0 +1,55 @@ +
+#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
+
+#include "Witch.h"
+
+
+
+
+
+cWitch::cWitch()
+{
+ m_MobType = 66;
+ GetMonsterConfig("Witch");
+}
+
+
+
+
+
+cWitch::~cWitch()
+{
+}
+
+
+
+
+
+bool cWitch::IsA( const char* a_EntityType )
+{
+ if( strcmp( a_EntityType, "cWitch" ) == 0 ) return true;
+ return cMonster::IsA( a_EntityType );
+}
+
+
+
+
+
+void cWitch::KilledBy( cEntity* a_Killer )
+{
+ cItems Drops;
+ AddRandomDropItem(Drops, 0, 6, E_ITEM_GLASS_BOTTLE);
+ AddRandomDropItem(Drops, 0, 6, E_ITEM_GLOWSTONE_DUST);
+ AddRandomDropItem(Drops, 0, 6, E_ITEM_GUNPOWDER);
+ AddRandomDropItem(Drops, 0, 6, E_ITEM_REDSTONE_DUST);
+ AddRandomDropItem(Drops, 0, 6, E_ITEM_SPIDER_EYE);
+ AddRandomDropItem(Drops, 0, 6, E_ITEM_STICK);
+ AddRandomDropItem(Drops, 0, 6, E_ITEM_SUGAR);
+ m_World->SpawnItemPickups(Drops, m_Pos.x, m_Pos.y, m_Pos.z);
+
+ cMonster::KilledBy( a_Killer );
+}
+
+
+
+
|