6 #include "../ClientHandle.h"
12 Super(
"WitherSkeleton",
mtWitherSkeleton,
"entity.wither_skeleton.hurt",
"entity.wither_skeleton.death",
"entity.wither_skeleton.ambient", 0.7f, 2.4f)
37 unsigned int LootingLevel = 0;
38 if (a_Killer !=
nullptr)
MTRand & GetRandomProvider()
Returns the current thread's random number source.
void SendEntityEquipment(const cEntity &a_Entity, short a_SlotNum, const cItem &a_Item)
unsigned int GetLevel(int a_EnchantmentID) const
Returns the level for the specified enchantment; 0 if not stored.
virtual cItem GetEquippedWeapon(void) const
Returns the curently equipped weapon; empty item if none.
void AddEntityEffect(cEntityEffect::eType a_EffectType, int a_EffectDurationTicks, short a_EffectIntensity, double a_DistanceModifier=1)
Applies an entity effect.
cEnchantments m_Enchantments
This class bridges a vector of cItem for safe access via Lua.
void Add(const cItem &a_Item)
virtual bool Attack(std::chrono::milliseconds a_Dt)
Try to perform attack returns true if attack was deemed successful (hit player, fired projectile,...
virtual void SpawnOn(cClientHandle &a_ClientHandle) override
Descendants override this function to send a command to the specified client to spawn the entity on t...
void AddRandomRareDropItem(cItems &a_Drops, cItems &a_Items, unsigned int a_LootingLevel)
Adds one rare item out of the list of rare items a_Items modified by the looting level a_LootingLevel...
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.
cPawn * GetTarget()
Returns the current target.
void AddRandomWeaponDropItem(cItems &a_Drops, unsigned int a_LootingLevel)
Adds weapon that is equipped with the chance saved in m_DropChance... to the drop.
void AddRandomArmorDropItem(cItems &a_Drops, unsigned int a_LootingLevel)
Adds armor that is equipped with the chance saved in m_DropChance... to the drop.
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 Attack(std::chrono::milliseconds a_Dt) override
Try to perform attack returns true if attack was deemed successful (hit player, fired projectile,...
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.
virtual void SpawnOn(cClientHandle &a_ClientHandle) override
Descendants override this function to send a command to the specified client to spawn the entity on t...