Added 3 new rules for pvp item looting
This commit is contained in:
parent
a8669726db
commit
0bab351eab
2 changed files with 36 additions and 0 deletions
|
|
@ -728,6 +728,9 @@ RULE_BOOL(Inventory, EnforceAugmentWear, true) // Forces augment wear slot valid
|
|||
RULE_BOOL(Inventory, DeleteTransformationMold, true) //False if you want mold to last forever
|
||||
RULE_BOOL(Inventory, AllowAnyWeaponTransformation, false) //Weapons can use any weapon transformation
|
||||
RULE_BOOL(Inventory, TransformSummonedBags, false) //Transforms summoned bags into disenchanted ones instead of deleting
|
||||
RULE_INT(Inventory, PVPLootableEquipSlots, 0) //When looting a player's corpse, equipped items in slots listed here are lootable.
|
||||
RULE_BOOL(Inventory, PVPCanLootNoTrade, false) //Can players loot no trade items from player corpses?
|
||||
RULE_BOOL(Inventory, PVPCanLootContainer, false) //Can players loot bags/containers from player corpses?
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Client)
|
||||
|
|
|
|||
|
|
@ -1146,6 +1146,39 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
|
|||
}
|
||||
|
||||
if (client && inst) {
|
||||
|
||||
if (GetCharID() != client->CharacterID()) { //PVP Looting
|
||||
if (inst->GetItem()->NoDrop == 0 && !RuleB(Inventory, PVPCanLootNoTrade)) {
|
||||
client->Message(13, "You may not loot NO DROP items from this corpse.");
|
||||
client->QueuePacket(app);
|
||||
SendEndLootErrorPacket(client);
|
||||
ResetLooter();
|
||||
delete inst;
|
||||
return;
|
||||
}
|
||||
|
||||
if (inst->GetItem()->BagSlots > 0 && !RuleB(Inventory, PVPCanLootContainer)) {
|
||||
client->Message(13, "You may not loot containers from this corpse.");
|
||||
client->QueuePacket(app);
|
||||
SendEndLootErrorPacket(client);
|
||||
ResetLooter();
|
||||
delete inst;
|
||||
return;
|
||||
}
|
||||
|
||||
if (RuleI(Inventory, PVPLootableEquipSlots) > 0 && item_data->equip_slot < 23) {
|
||||
int bit = 1 << item_data->equip_slot;
|
||||
if (RuleI(Inventory, PVPLootableEquipSlots) & bit != 1) {
|
||||
client->Message(13, "This item is equipped in a slot you cannot loot from.");
|
||||
client->QueuePacket(app);
|
||||
SendEndLootErrorPacket(client);
|
||||
ResetLooter();
|
||||
delete inst;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (client->CheckLoreConflict(item)) {
|
||||
client->Message_StringID(0, LOOT_LORE_ERROR);
|
||||
client->QueuePacket(app);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue