1
0

StringToItem() sets item's count to 1 after a successful parse

git-svn-id: http://mc-server.googlecode.com/svn/trunk@854 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-09-08 21:33:53 +00:00
parent 3f1eb05593
commit 27b02efffa

View File

@ -86,6 +86,7 @@ public:
{ {
a_Item.m_ItemDamage = 0; a_Item.m_ItemDamage = 0;
} }
a_Item.m_ItemCount = 1;
return true; return true;
} }
@ -107,6 +108,7 @@ public:
} }
if (Split.size() < 2) if (Split.size() < 2)
{ {
a_Item.m_ItemCount = 1;
return true; return true;
} }
a_Item.m_ItemDamage = atoi(Split[1].c_str()); a_Item.m_ItemDamage = atoi(Split[1].c_str());
@ -115,7 +117,7 @@ public:
// Parsing the number failed // Parsing the number failed
return false; return false;
} }
a_Item.m_ItemCount = 1;
return true; return true;
} }