mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Items] Overhaul Item Hand-in System (#4593)
* [Items] Overhaul Item Hand-in System * Edge case lua fix * Merge fix * I'm going to be amazed if this works first try * Update linux-build.sh * Update linux-build.sh * Update linux-build.sh * Update linux-build.sh * Update linux-build.sh * Update linux-build.sh * Update linux-build.sh * Update linux-build.sh * Add protections against scripts that hand back items themselves * Remove EVENT_ITEM_ScriptStopReturn * test * Update npc_handins.cpp * Add Items:AlwaysReturnHandins * Update spdat.cpp * Bypass update prompt on CI
This commit is contained in:
@@ -220,6 +220,34 @@ bool EQ::ItemData::IsType1HWeapon() const
|
||||
return ((ItemType == item::ItemType1HBlunt) || (ItemType == item::ItemType1HSlash) || (ItemType == item::ItemType1HPiercing) || (ItemType == item::ItemTypeMartial));
|
||||
}
|
||||
|
||||
bool EQ::ItemData::IsPetUsable() const
|
||||
{
|
||||
if (ItemClass == item::ItemClassBag) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// if it's a misc item and has slots, it's wearable
|
||||
// this item type is conflated with many other item types
|
||||
if (ItemClass == item::ItemTypeMisc && Slots != 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (ItemType) {
|
||||
case item::ItemType1HBlunt:
|
||||
case item::ItemType1HSlash:
|
||||
case item::ItemType1HPiercing:
|
||||
case item::ItemType2HBlunt:
|
||||
case item::ItemType2HSlash:
|
||||
case item::ItemTypeMartial:
|
||||
case item::ItemTypeShield:
|
||||
case item::ItemTypeArmor:
|
||||
case item::ItemTypeJewelry:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool EQ::ItemData::IsType2HWeapon() const
|
||||
{
|
||||
return ((ItemType == item::ItemType2HBlunt) || (ItemType == item::ItemType2HSlash) || (ItemType == item::ItemType2HPiercing));
|
||||
|
||||
Reference in New Issue
Block a user