Added two rules to toggle ornamentations on/off or specify the augtype value

This commit is contained in:
ricardocampos23
2014-04-18 22:31:02 +01:00
parent fcaa52e0c3
commit 5fa1db4c21
11 changed files with 8285 additions and 13 deletions
+3 -3
View File
@@ -4578,7 +4578,7 @@ int32 Bot::GetEquipmentMaterial(uint8 material_slot) const
const ItemInst* inst = m_inv.GetItem(inventorySlot);
if (inst != nullptr)
{
if (inst->HasOrnamentation())
if (RuleB(Inventory,UseAugOrnamentations) && inst->HasOrnamentation())
{
const ItemInst* ornament = inst->GetOrnamentation();
if (strlen(ornament->GetItem()->IDFile) > 2)
@@ -4714,7 +4714,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
item = inst->GetItem();
if(item)
{
if (inst->HasOrnamentation())
if (RuleB(Inventory,UseAugOrnamentations) && inst->HasOrnamentation())
{
const ItemInst* ornament = inst->GetOrnamentation();
if (strlen(ornament->GetItem()->IDFile) > 2)
@@ -4738,7 +4738,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
item = inst->GetItem();
if(item)
{
if (inst->HasOrnamentation())
if (RuleB(Inventory,UseAugOrnamentations) && inst->HasOrnamentation())
{
const ItemInst* ornament = inst->GetOrnamentation();
if (strlen(ornament->GetItem()->IDFile) > 2)
+2 -2
View File
@@ -1907,7 +1907,7 @@ void Client::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
ns->spawn.colors[MaterialFeet].color = GetEquipmentColor(MaterialFeet);
}
if ((inst = m_inv[SLOT_PRIMARY]) && inst->IsType(ItemClassCommon)) {
if (inst->HasOrnamentation())
if (RuleB(Inventory,UseAugOrnamentations) && inst->HasOrnamentation())
{
const ItemInst* ornament = inst->GetOrnamentation();
if (strlen(ornament->GetItem()->IDFile) > 2)
@@ -1923,7 +1923,7 @@ void Client::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
}
}
if ((inst = m_inv[SLOT_SECONDARY]) && inst->IsType(ItemClassCommon)) {
if (inst->HasOrnamentation())
if (RuleB(Inventory,UseAugOrnamentations) && inst->HasOrnamentation())
{
const ItemInst* ornament = inst->GetOrnamentation();
if (strlen(ornament->GetItem()->IDFile) > 2)
+8267
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -4707,7 +4707,7 @@ void command_iteminfo(Client *c, const Seperator *sep)
const Item_Struct* item = inst->GetItem();
c->Message(0, "ID: %i Name: %s", item->ID, item->Name);
c->Message(0, " Lore: %s ND: %i NS: %i Type: %i", (item->LoreFlag) ? "true":"false", item->NoDrop, item->NoRent, item->ItemClass);
if(inst->HasOrnamentation())
if(RuleB(Inventory,UseAugOrnamentations) && inst->HasOrnamentation())
{
c->Message(0, " IDF: %s Size: %i Weight: %i icon_id: %i Price: %i", inst->GetOrnamentation()->GetItem()->IDFile, item->Size, item->Weight, item->Icon, item->Price);
}