1
0

Changed killer detection by using cEntity methods

This commit is contained in:
TheJumper 2014-02-22 01:27:32 +01:00
parent 7a7b9e88b2
commit 764de9c399
3 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ cBlaze::cBlaze(void) :
void cBlaze::GetDrops(cItems & a_Drops, cEntity * a_Killer) 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); int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_BLAZE_ROD); AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_BLAZE_ROD);

View File

@ -33,7 +33,7 @@ void cCavespider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
{ {
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_STRING); 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); AddRandomUncommonDropItem(a_Drops, 33.0f, E_ITEM_SPIDER_EYE);
} }

View File

@ -20,7 +20,7 @@ void cSpider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
{ {
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING); int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(E_ENCHANTMENT_LOOTING);
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_STRING); 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); AddRandomUncommonDropItem(a_Drops, 33.0f, E_ITEM_SPIDER_EYE);
} }