Added trade hack detection code

This commit is contained in:
Uleat
2016-12-03 18:17:10 -05:00
parent c482738d79
commit 0ab0c5c117
7 changed files with 84 additions and 16 deletions
+27 -13
View File
@@ -967,23 +967,37 @@ bool Client::CheckTradeLoreConflict(Client* other)
{
if (!other)
return true;
// Move each trade slot into free inventory slot
for (int16 i = EQEmu::legacy::TRADE_BEGIN; i <= EQEmu::legacy::TRADE_END; i++){
const EQEmu::ItemInstance* inst = m_inv[i];
if (inst && inst->GetItem()) {
if (other->CheckLoreConflict(inst->GetItem()))
return true;
}
for (int16 index = EQEmu::legacy::TRADE_BEGIN; index <= EQEmu::legacy::TRADE_END; ++index) {
const EQEmu::ItemInstance* inst = m_inv[index];
if (!inst || !inst->GetItem())
continue;
if (other->CheckLoreConflict(inst->GetItem()))
return true;
}
for (int16 i = EQEmu::legacy::TRADE_BAGS_BEGIN; i <= EQEmu::legacy::TRADE_BAGS_END; i++){
const EQEmu::ItemInstance* inst = m_inv[i];
for (int16 index = EQEmu::legacy::TRADE_BAGS_BEGIN; index <= EQEmu::legacy::TRADE_BAGS_END; ++index) {
const EQEmu::ItemInstance* inst = m_inv[index];
if (!inst || !inst->GetItem())
continue;
if (inst && inst->GetItem()) {
if (other->CheckLoreConflict(inst->GetItem()))
return true;
}
if (other->CheckLoreConflict(inst->GetItem()))
return true;
}
return false;
}
bool Client::CheckTradeNonDroppable()
{
for (int16 index = EQEmu::legacy::TRADE_BEGIN; index <= EQEmu::legacy::TRADE_END; ++index){
const EQEmu::ItemInstance* inst = m_inv[index];
if (!inst)
continue;
if (!inst->IsDroppable())
return true;
}
return false;