Fixed Mob Drops, Add Rare and Uncommon Drops, Looting inflicts Drops
This commit is contained in:
parent
1b081a0fbb
commit
1b32b00562
@ -19,7 +19,11 @@ cBlaze::cBlaze(void) :
|
|||||||
|
|
||||||
void cBlaze::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cBlaze::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 1, E_ITEM_BLAZE_ROD);
|
if (a_Killer->IsA("cPlayer") || a_Killer->IsA("cWolf"))
|
||||||
|
{
|
||||||
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
|
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_BLAZE_ROD);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,8 +31,12 @@ void cCavespider::Tick(float a_Dt, cChunk & a_Chunk)
|
|||||||
|
|
||||||
void cCavespider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cCavespider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_STRING);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
AddRandomDropItem(a_Drops, 0, 1, E_ITEM_SPIDER_EYE);
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_STRING);
|
||||||
|
if (a_Killer->IsA("cPlayer") || a_Killer->IsA("cWolf"))
|
||||||
|
{
|
||||||
|
AddRandomUncommonDropItem(a_Drops, 33.0f, E_ITEM_SPIDER_EYE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,8 +48,9 @@ void cChicken::Tick(float a_Dt, cChunk & a_Chunk)
|
|||||||
|
|
||||||
void cChicken::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cChicken::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_FEATHER);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
a_Drops.push_back(cItem(IsOnFire() ? E_ITEM_COOKED_CHICKEN : E_ITEM_RAW_CHICKEN, 1));
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_FEATHER);
|
||||||
|
AddRandomDropItem(a_Drops, 1, 1, IsOnFire() ? E_ITEM_COOKED_CHICKEN : E_ITEM_RAW_CHICKEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,8 +21,9 @@ cCow::cCow(void) :
|
|||||||
|
|
||||||
void cCow::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cCow::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_LEATHER);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
AddRandomDropItem(a_Drops, 1, 3, IsOnFire() ? E_ITEM_STEAK : E_ITEM_RAW_BEEF);
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_LEATHER);
|
||||||
|
AddRandomDropItem(a_Drops, 1, 3 + LootingLevel, IsOnFire() ? E_ITEM_STEAK : E_ITEM_RAW_BEEF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,7 +39,8 @@ void cCreeper::Tick(float a_Dt, cChunk & a_Chunk)
|
|||||||
|
|
||||||
void cCreeper::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cCreeper::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_GUNPOWDER);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_GUNPOWDER);
|
||||||
|
|
||||||
if ((a_Killer != NULL) && (a_Killer->IsProjectile()))
|
if ((a_Killer != NULL) && (a_Killer->IsProjectile()))
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,8 @@ cEnderman::cEnderman(void) :
|
|||||||
|
|
||||||
void cEnderman::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cEnderman::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 1, E_ITEM_ENDER_PEARL);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
|
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_ENDER_PEARL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,8 +18,9 @@ cGhast::cGhast(void) :
|
|||||||
|
|
||||||
void cGhast::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cGhast::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_GUNPOWDER);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
AddRandomDropItem(a_Drops, 0, 1, E_ITEM_GHAST_TEAR);
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_GUNPOWDER);
|
||||||
|
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_GHAST_TEAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -140,7 +140,8 @@ void cHorse::OnRightClicked(cPlayer & a_Player)
|
|||||||
|
|
||||||
void cHorse::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cHorse::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_LEATHER);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_LEATHER);
|
||||||
if (m_bIsSaddled)
|
if (m_bIsSaddled)
|
||||||
{
|
{
|
||||||
a_Drops.push_back(cItem(E_ITEM_SADDLE, 1));
|
a_Drops.push_back(cItem(E_ITEM_SADDLE, 1));
|
||||||
|
@ -19,6 +19,7 @@ cIronGolem::cIronGolem(void) :
|
|||||||
void cIronGolem::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cIronGolem::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 5, E_ITEM_IRON);
|
AddRandomDropItem(a_Drops, 0, 5, E_ITEM_IRON);
|
||||||
|
AddRandomDropItem(a_Drops, 0, 2, E_BLOCK_FLOWER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,10 @@ cMagmaCube::cMagmaCube(int a_Size) :
|
|||||||
|
|
||||||
void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cMagmaCube::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 1, E_ITEM_MAGMA_CREAM);
|
if (GetSize() > 1)
|
||||||
|
{
|
||||||
|
AddRandomUncommonDropItem(a_Drops, 25.0f, E_ITEM_MAGMA_CREAM);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -880,6 +880,35 @@ void cMonster::AddRandomDropItem(cItems & a_Drops, unsigned int a_Min, unsigned
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cMonster::AddRandomUncommonDropItem(cItems & a_Drops, float a_Chance, short a_Item, short a_ItemHealth)
|
||||||
|
{
|
||||||
|
MTRand r1;
|
||||||
|
int Count = r1.randInt() % 1000;
|
||||||
|
if (Count < (a_Chance*10))
|
||||||
|
{
|
||||||
|
a_Drops.push_back(cItem(a_Item, 1, a_ItemHealth));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cMonster::AddRandomRareDropItem(cItems & a_Drops, cItems & a_Items, short a_LootingLevel)
|
||||||
|
{
|
||||||
|
MTRand r1;
|
||||||
|
int Count = r1.randInt() % 200;
|
||||||
|
if (Count < (5 + a_LootingLevel))
|
||||||
|
{
|
||||||
|
int Rare = r1.randInt() % a_Items.Size();
|
||||||
|
a_Drops.push_back(a_Items.at(Rare));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cMonster::HandleDaylightBurning(cChunk & a_Chunk)
|
void cMonster::HandleDaylightBurning(cChunk & a_Chunk)
|
||||||
{
|
{
|
||||||
if (!m_BurnsInDaylight)
|
if (!m_BurnsInDaylight)
|
||||||
|
@ -224,6 +224,9 @@ protected:
|
|||||||
bool m_BurnsInDaylight;
|
bool m_BurnsInDaylight;
|
||||||
|
|
||||||
void AddRandomDropItem(cItems & a_Drops, unsigned int a_Min, unsigned int a_Max, short a_Item, short a_ItemHealth = 0);
|
void AddRandomDropItem(cItems & a_Drops, unsigned int a_Min, unsigned int a_Max, short a_Item, short a_ItemHealth = 0);
|
||||||
|
void AddRandomUncommonDropItem(cItems & a_Drops, float a_Chance, short a_Item, short a_ItemHealth = 0);
|
||||||
|
void AddRandomRareDropItem(cItems & a_Drops, cItems & a_Items, short a_LootingLevel);
|
||||||
|
|
||||||
|
|
||||||
} ; // tolua_export
|
} ; // tolua_export
|
||||||
|
|
||||||
|
@ -23,8 +23,9 @@ cMooshroom::cMooshroom(void) :
|
|||||||
|
|
||||||
void cMooshroom::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cMooshroom::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_LEATHER);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
AddRandomDropItem(a_Drops, 1, 3, IsOnFire() ? E_ITEM_STEAK : E_ITEM_RAW_BEEF);
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_LEATHER);
|
||||||
|
AddRandomDropItem(a_Drops, 1, 3 + LootingLevel, IsOnFire() ? E_ITEM_STEAK : E_ITEM_RAW_BEEF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +21,8 @@ cPig::cPig(void) :
|
|||||||
|
|
||||||
void cPig::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cPig::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 1, 3, IsOnFire() ? E_ITEM_COOKED_PORKCHOP : E_ITEM_RAW_PORKCHOP);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
|
AddRandomDropItem(a_Drops, 1, 3 + LootingLevel, IsOnFire() ? E_ITEM_COOKED_PORKCHOP : E_ITEM_RAW_PORKCHOP);
|
||||||
if (m_bIsSaddled)
|
if (m_bIsSaddled)
|
||||||
{
|
{
|
||||||
a_Drops.push_back(cItem(E_ITEM_SADDLE, 1));
|
a_Drops.push_back(cItem(E_ITEM_SADDLE, 1));
|
||||||
|
@ -20,8 +20,28 @@ cSkeleton::cSkeleton(bool IsWither) :
|
|||||||
|
|
||||||
void cSkeleton::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cSkeleton::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_ARROW);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_BONE);
|
if (IsWither())
|
||||||
|
{
|
||||||
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_BONE);
|
||||||
|
AddRandomUncommonDropItem(a_Drops, 33.0f, E_ITEM_COAL);
|
||||||
|
cItems RareDrops;
|
||||||
|
RareDrops.Add(cItem(E_ITEM_HEAD, 1, 1));
|
||||||
|
if (!GetEquippedWeapon().IsEmpty()) RareDrops.Add(GetEquippedWeapon());
|
||||||
|
AddRandomRareDropItem(a_Drops, RareDrops, LootingLevel);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_ARROW);
|
||||||
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_BONE);
|
||||||
|
cItems RareDrops;
|
||||||
|
if (!GetEquippedHelmet().IsEmpty()) RareDrops.Add(GetEquippedHelmet());
|
||||||
|
if (!GetEquippedChestplate().IsEmpty()) RareDrops.Add(GetEquippedChestplate());
|
||||||
|
if (!GetEquippedLeggings().IsEmpty()) RareDrops.Add(GetEquippedLeggings());
|
||||||
|
if (!GetEquippedBoots().IsEmpty()) RareDrops.Add(GetEquippedBoots());
|
||||||
|
if (!GetEquippedWeapon().IsEmpty()) RareDrops.Add(GetEquippedWeapon());
|
||||||
|
AddRandomRareDropItem(a_Drops, RareDrops, LootingLevel);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,8 +20,11 @@ cSlime::cSlime(int a_Size) :
|
|||||||
|
|
||||||
void cSlime::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cSlime::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
// TODO: only when tiny
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_SLIMEBALL);
|
if (GetSize() == 1)
|
||||||
|
{
|
||||||
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_SLIMEBALL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ cSnowGolem::cSnowGolem(void) :
|
|||||||
|
|
||||||
void cSnowGolem::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cSnowGolem::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 5, E_ITEM_SNOWBALL);
|
AddRandomDropItem(a_Drops, 0, 15, E_ITEM_SNOWBALL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,8 +18,12 @@ cSpider::cSpider(void) :
|
|||||||
|
|
||||||
void cSpider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cSpider::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_STRING);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
AddRandomDropItem(a_Drops, 0, 1, E_ITEM_SPIDER_EYE);
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_STRING);
|
||||||
|
if (a_Killer->IsA("cPlayer") || a_Killer->IsA("cWolf"))
|
||||||
|
{
|
||||||
|
AddRandomUncommonDropItem(a_Drops, 33.0f, E_ITEM_SPIDER_EYE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +21,8 @@ cSquid::cSquid(void) :
|
|||||||
void cSquid::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cSquid::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
// Drops 0-3 Ink Sacs
|
// Drops 0-3 Ink Sacs
|
||||||
AddRandomDropItem(a_Drops, 0, 3, E_ITEM_DYE, E_META_DYE_BLACK);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
|
AddRandomDropItem(a_Drops, 0, 3 + LootingLevel, E_ITEM_DYE, E_META_DYE_BLACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,13 +18,26 @@ cWitch::cWitch(void) :
|
|||||||
|
|
||||||
void cWitch::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cWitch::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 6, E_ITEM_GLASS_BOTTLE);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
AddRandomDropItem(a_Drops, 0, 6, E_ITEM_GLOWSTONE_DUST);
|
MTRand r1;
|
||||||
AddRandomDropItem(a_Drops, 0, 6, E_ITEM_GUNPOWDER);
|
int DropTypeCount = (r1.randInt() % 3) + 1;
|
||||||
AddRandomDropItem(a_Drops, 0, 6, E_ITEM_REDSTONE_DUST);
|
for (int i = 0; i < DropTypeCount; i++)
|
||||||
AddRandomDropItem(a_Drops, 0, 6, E_ITEM_SPIDER_EYE);
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 6, E_ITEM_STICK);
|
int DropType = r1.randInt() % 7;
|
||||||
AddRandomDropItem(a_Drops, 0, 6, E_ITEM_SUGAR);
|
switch (DropType)
|
||||||
|
{
|
||||||
|
case 0: AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_GLASS_BOTTLE);
|
||||||
|
case 1: AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_GLOWSTONE_DUST);
|
||||||
|
case 2: AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_GUNPOWDER);
|
||||||
|
case 3: AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_REDSTONE_DUST);
|
||||||
|
case 4: AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_SPIDER_EYE);
|
||||||
|
case 5: AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_STICK);
|
||||||
|
case 6: AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_SUGAR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cItems RareDrops;
|
||||||
|
if (!GetEquippedWeapon().IsEmpty()) RareDrops.Add(GetEquippedWeapon());
|
||||||
|
AddRandomRareDropItem(a_Drops, RareDrops, LootingLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "AggressiveMonster.h"
|
#include "AggressiveMonster.h"
|
||||||
|
#include "../MersenneTwister.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,9 +23,18 @@ cZombie::cZombie(bool a_IsVillagerZombie) :
|
|||||||
|
|
||||||
void cZombie::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cZombie::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 2, E_ITEM_ROTTEN_FLESH);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
|
AddRandomDropItem(a_Drops, 0, 2 + LootingLevel, E_ITEM_ROTTEN_FLESH);
|
||||||
// TODO: Rare drops
|
cItems RareDrops;
|
||||||
|
RareDrops.Add(cItem(E_ITEM_IRON));
|
||||||
|
RareDrops.Add(cItem(E_ITEM_CARROT));
|
||||||
|
RareDrops.Add(cItem(E_ITEM_POTATO));
|
||||||
|
if (!GetEquippedHelmet().IsEmpty()) RareDrops.Add(GetEquippedHelmet());
|
||||||
|
if (!GetEquippedChestplate().IsEmpty()) RareDrops.Add(GetEquippedChestplate());
|
||||||
|
if (!GetEquippedLeggings().IsEmpty()) RareDrops.Add(GetEquippedLeggings());
|
||||||
|
if (!GetEquippedBoots().IsEmpty()) RareDrops.Add(GetEquippedBoots());
|
||||||
|
if (!GetEquippedWeapon().IsEmpty()) RareDrops.Add(GetEquippedWeapon());
|
||||||
|
AddRandomRareDropItem(a_Drops, RareDrops, LootingLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,10 +19,14 @@ cZombiePigman::cZombiePigman(void) :
|
|||||||
|
|
||||||
void cZombiePigman::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
void cZombiePigman::GetDrops(cItems & a_Drops, cEntity * a_Killer)
|
||||||
{
|
{
|
||||||
AddRandomDropItem(a_Drops, 0, 1, E_ITEM_ROTTEN_FLESH);
|
int LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(21);
|
||||||
AddRandomDropItem(a_Drops, 0, 1, E_ITEM_GOLD_NUGGET);
|
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_ROTTEN_FLESH);
|
||||||
|
AddRandomDropItem(a_Drops, 0, 1 + LootingLevel, E_ITEM_GOLD_NUGGET);
|
||||||
|
|
||||||
// TODO: Rare drops
|
cItems RareDrops;
|
||||||
|
RareDrops.Add(cItem(E_ITEM_GOLD));
|
||||||
|
if (!GetEquippedWeapon().IsEmpty()) RareDrops.Add(GetEquippedWeapon());
|
||||||
|
AddRandomRareDropItem(a_Drops, RareDrops, LootingLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user