From 1cca9b13b3d320ff767cfc552413265b2ef6e0d6 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Wed, 6 Jun 2012 20:18:50 +0000 Subject: Item-dropping code rewritten and centralized - now there's only one place to modify if we want to split or merge same-item drops: cWorld:SpawnItemPickups(). Also, mined blocks can now drop more items, and they recognize if they're being mined by the correct tool. git-svn-id: http://mc-server.googlecode.com/svn/trunk@561 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cMonster.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source/cMonster.h') diff --git a/source/cMonster.h b/source/cMonster.h index 4a292d193..b1e237d80 100644 --- a/source/cMonster.h +++ b/source/cMonster.h @@ -5,6 +5,8 @@ #include "Defines.h" #include "cWorld.h" #include "BlockID.h" +#include "cItem.h" +#include "BlockID.h" @@ -91,7 +93,9 @@ protected: float m_AttackRange; float m_AttackInterval; - void DropItem(ENUM_ITEM_ID a_Item, unsigned int a_Count); - void RandomDropItem(ENUM_ITEM_ID a_Item, unsigned int a_Min, unsigned int a_Max); - + void AddRandomDropItem(cItems & a_Drops, unsigned int a_Min, unsigned int a_Max, ENUM_ITEM_ID a_Item, short a_ItemHealth = 0); }; //tolua_export + + + + -- cgit v1.2.3