fix(Script/Command): HandleAddItemCommand (#5412)
* fix(Core/Command): Additem * Update cs_misc.cpp
This commit is contained in:
@@ -1540,6 +1540,9 @@ public:
|
|||||||
|
|
||||||
// Subtract
|
// Subtract
|
||||||
if (count < 0)
|
if (count < 0)
|
||||||
|
{
|
||||||
|
// Only have scam check on player accounts
|
||||||
|
if (playerTarget->GetSession()->GetSecurity() == SEC_PLAYER)
|
||||||
{
|
{
|
||||||
if (!playerTarget->HasItemCount(itemId, 0))
|
if (!playerTarget->HasItemCount(itemId, 0))
|
||||||
{
|
{
|
||||||
@@ -1551,6 +1554,7 @@ public:
|
|||||||
// output that player don't have as many items that you want to destroy
|
// output that player don't have as many items that you want to destroy
|
||||||
handler->PSendSysMessage(LANG_REMOVEITEM_ERROR, handler->GetNameLink(playerTarget).c_str(), itemId);
|
handler->PSendSysMessage(LANG_REMOVEITEM_ERROR, handler->GetNameLink(playerTarget).c_str(), itemId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// output successful amount of destroyed items
|
// output successful amount of destroyed items
|
||||||
@@ -1561,14 +1565,6 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* [AC] Sunwell hack
|
|
||||||
if (handler->GetSession()->GetSecurity() < SEC_ADMINISTRATOR)
|
|
||||||
{
|
|
||||||
handler->PSendSysMessage("You may only remove items. Adding items is available for higher GMLevel.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Adding items
|
// Adding items
|
||||||
uint32 noSpaceForCount = 0;
|
uint32 noSpaceForCount = 0;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user