Client::DeleteItemInInventory() And Client::SummonItem() fix.

This commit is contained in:
Kinglykrab
2014-06-11 00:44:19 -04:00
parent 3a4250603a
commit 6616dd9dad
2 changed files with 3 additions and 5 deletions
+2 -4
View File
@@ -35,7 +35,6 @@
#include "QuestParserCollection.h" #include "QuestParserCollection.h"
extern WorldServer worldserver; extern WorldServer worldserver;
// @merth: this needs to be touched up
uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) { uint32 Client::NukeItem(uint32 itemnum, uint8 where_to_check) {
if (itemnum == 0) if (itemnum == 0)
return 0; return 0;
@@ -598,8 +597,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2,
// Drop item from inventory to ground (generally only dropped from SLOT_CURSOR) // Drop item from inventory to ground (generally only dropped from SLOT_CURSOR)
void Client::DropItem(int16 slot_id) void Client::DropItem(int16 slot_id)
{ {
if(GetInv().CheckNoDrop(slot_id) && RuleI(World, FVNoDropFlag) == 0 || if(GetInv().CheckNoDrop(slot_id) && RuleI(World, FVNoDropFlag) == 0 || RuleI(Character, MinStatusForNoDropExemptions) < Admin() && RuleI(World, FVNoDropFlag) == 2) {
RuleI(Character, MinStatusForNoDropExemptions) < Admin() && RuleI(World, FVNoDropFlag) == 2) {
database.SetHackerFlag(this->AccountName(), this->GetCleanName(), "Tried to drop an item on the ground that was nodrop!"); database.SetHackerFlag(this->AccountName(), this->GetCleanName(), "Tried to drop an item on the ground that was nodrop!");
GetInv().DeleteItem(slot_id); GetInv().DeleteItem(slot_id);
return; return;
@@ -682,7 +680,7 @@ int32 Client::GetAugmentIDAt(int16 slot_id, uint8 augslot) {
} }
// Remove item from inventory // Remove item from inventory
void Client::DeleteItemInInventory(int16 slot_id, int8 quantity, bool client_update, bool update_db) { void Client::DeleteItemInInventory(int16 slot_id, int16 quantity, bool client_update, bool update_db) {
#if (EQDEBUG >= 5) #if (EQDEBUG >= 5)
LogFile->write(EQEMuLog::Debug, "DeleteItemInInventory(%i, %i, %s)", slot_id, quantity, (client_update) ? "true":"false"); LogFile->write(EQEMuLog::Debug, "DeleteItemInInventory(%i, %i, %s)", slot_id, quantity, (client_update) ? "true":"false");
#endif #endif
+1 -1
View File
@@ -3011,7 +3011,7 @@ XS(XS_Client_DeleteItemInInventory)
{ {
Client * THIS; Client * THIS;
int16 slot_id = (int16)SvIV(ST(1)); int16 slot_id = (int16)SvIV(ST(1));
int8 quantity; int16 quantity;
bool client_update; bool client_update;
if (sv_derived_from(ST(0), "Client")) { if (sv_derived_from(ST(0), "Client")) {