7 #include "../Entities/Player.h"
12 Super(
"Spider",
mtSpider,
"entity.spider.hurt",
"entity.spider.death",
"entity.spider.ambient", 1.4f, 0.9f)
22 unsigned int LootingLevel = 0;
23 if (a_Killer !=
nullptr)
28 if ((a_Killer !=
nullptr) && (a_Killer->
IsPlayer() || a_Killer->
IsA(
"cWolf")))
51 if ((Chunk->GetSkyLightAltered(Rel.x, Rel.y, Rel.z) <= 11) && (Chunk->GetBlockLight(Rel.x, Rel.y, Rel.z) <= 11))
#define PREPARE_REL_AND_CHUNK(Position, OriginalChunk)
unsigned int GetLevel(int a_EnchantmentID) const
Returns the level for the specified enchantment; 0 if not stored.
int GetChunkZ(void) const
bool IsPlayer(void) const
int GetChunkX(void) const
virtual bool IsA(const char *a_ClassName) const
Returns true if the entity is of the specified class or a subclass (cPawn's IsA("cEntity") returns tr...
virtual cItem GetEquippedWeapon(void) const
Returns the curently equipped weapon; empty item if none.
const Vector3d & GetPosition(void) const
Exported in ManualBindings.
cWorld * GetWorld(void) const
cEnchantments m_Enchantments
This class bridges a vector of cItem for safe access via Lua.
virtual void EventSeePlayer(cPlayer *a_Player, cChunk &a_Chunk) override
void AddRandomDropItem(cItems &a_Drops, unsigned int a_Min, unsigned int a_Max, short a_Item, short a_ItemHealth=0)
Adds a random number of a_Item between a_Min and a_Max to itemdrops a_Drops.
virtual bool DoTakeDamage(TakeDamageInfo &a_TDI) override
Makes this entity take damage specified in the a_TDI.
enum cMonster::MState m_EMState
void AddRandomUncommonDropItem(cItems &a_Drops, float a_Chance, short a_Item, short a_ItemHealth=0)
Adds a item a_Item with the chance of a_Chance (in percent) to itemdrops a_Drops.
virtual bool DoTakeDamage(TakeDamageInfo &a_TDI) override
Makes this entity take damage specified in the a_TDI.
virtual void EventSeePlayer(cPlayer *, cChunk &a_Chunk) override
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.