5 #include "../Entities/Player.h"
12 Super(
"Cow",
mtCow,
"entity.cow.hurt",
"entity.cow.death",
"entity.cow.ambient", 0.9f, 1.4f)
27 unsigned int LootingLevel = 0;
28 if (a_Killer !=
nullptr)
unsigned int GetLevel(int a_EnchantmentID) const
Returns the level for the specified enchantment; 0 if not stored.
virtual bool IsOnFire(void) const
virtual cItem GetEquippedWeapon(void) const
Returns the curently equipped weapon; empty item if none.
const cItem & GetEquippedItem(void) const
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
void ReplaceOneEquippedItemTossRest(const cItem &)
Removes one item from the the current equipped item stack, and attempts to add the specified item sta...
cEnchantments m_Enchantments
This class bridges a vector of cItem for safe access via Lua.
virtual void OnRightClicked(cPlayer &a_Player) override
Called when the specified player right-clicks this entity.
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
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 void OnRightClicked(cPlayer &a_Player) override
Called when the specified player right-clicks this entity.