Changed killer detection by using cEntity methods
This commit is contained in:
parent
7a7b9e88b2
commit
764de9c399
@ -19,7 +19,7 @@ cBlaze::cBlaze(void) :
|
||||
|
||||
void cBlaze::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||
{
|
||||
if (a_Killer->IsA("cPlayer") || a_Killer->IsA("cWolf"))
|
||||
if (a_Killer->IsPlayer() || a_Killer->IsA("cWolf"))
|
||||
{
|
||||
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
|
||||
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_BLAZE_ROD);
|
||||
|
@ -33,7 +33,7 @@ void cCavespider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||
{
|
||||
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
|
||||
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_STRING);
|
||||
if (a_Killer->IsA("cPlayer") || a_Killer->IsA("cWolf"))
|
||||
if (a_Killer->IsPlayer() || a_Killer->IsA("cWolf"))
|
||||
{
|
||||
AddRandomUncommonDropItem(a_Drops, 33.0f, E_ITEM_SPIDER_EYE);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ void cSpider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||
{
|
||||
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
|
||||
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_STRING);
|
||||
if (a_Killer->IsA("cPlayer") || a_Killer->IsA("cWolf"))
|
||||
if (a_Killer->IsPlayer() || a_Killer->IsA("cWolf"))
|
||||
{
|
||||
AddRandomUncommonDropItem(a_Drops, 33.0f, E_ITEM_SPIDER_EYE);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user