5 #include "../FastRandom.h"
12 Super(
"Witch",
mtWitch,
"entity.witch.hurt",
"entity.witch.death",
"entity.witch.ambient", 0.6f, 1.95f)
22 unsigned int LootingLevel = 0;
23 if (a_Killer !=
nullptr)
28 int DropTypeCount = r1.RandInt(1, 3);
29 for (
int i = 0; i < DropTypeCount; i++)
31 int DropType = r1.RandInt(6);
MTRand & GetRandomProvider()
Returns the current thread's random number source.
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.
cEnchantments m_Enchantments
This class bridges a vector of cItem for safe access via Lua.
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.
void AddRandomWeaponDropItem(cItems &a_Drops, unsigned int a_LootingLevel)
Adds weapon that is equipped with the chance saved in m_DropChance... to the drop.
virtual void GetDrops(cItems &a_Drops, cEntity *a_Killer=nullptr) override
Returns the list of drops for this pawn when it is killed.