From 90c398a3926f097e51955817e2829d831ae2bd2b Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 19 May 2013 18:22:37 +0000 Subject: Inventory code cleanup, players can now see each other's armor git-svn-id: http://mc-server.googlecode.com/svn/trunk@1493 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/Item.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/Item.cpp') diff --git a/source/Item.cpp b/source/Item.cpp index 60bd7da95..a2e4a9f24 100644 --- a/source/Item.cpp +++ b/source/Item.cpp @@ -58,7 +58,7 @@ short cItem::GetMaxDamage(void) const -bool cItem::DamageItem(void) +bool cItem::DamageItem(short a_Amount) { short MaxDamage = GetMaxDamage(); if (MaxDamage == 0) @@ -67,7 +67,7 @@ bool cItem::DamageItem(void) return false; } - m_ItemDamage++; + m_ItemDamage += a_Amount; return (m_ItemDamage >= MaxDamage); } -- cgit v1.2.3