1888 files, from working commit b1a079a. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
59 lines
11 KiB
JSON
59 lines
11 KiB
JSON
[
|
|
{
|
|
"file_sha256": "57f0a6ff8ef6b53b1e4961d5bafba265638f7238ec542a78b0ca3958dcc23b1e",
|
|
"first_line": 32,
|
|
"last_line": 186,
|
|
"path": "/home/praxis/Servers/tortoise-wow/src/game/Objects/Item.cpp",
|
|
"text": "void AddItemsSetItem(Player* player, Item* item)\n{\n ItemPrototype const* proto = item->GetProto();\n uint32 setid = proto->ItemSet;\n\n ItemSetEntry const* set = sItemSetStore.LookupEntry(setid);\n\n if (!set)\n {\n sLog.outErrorDb(\"Item set %u for item (id %u) not found, mods not applied.\", setid, proto->ItemId);\n return;\n }\n\n if (set->required_skill_id && player->GetSkillValue(set->required_skill_id) < set->required_skill_value)\n return;\n\n ItemSetEffect* eff = nullptr;\n\n for (const auto& x : player->m_ItemSetEff)\n {\n if (x && x->setid == setid)\n {\n eff = x;\n break;\n }\n }\n\n if (!eff)\n {\n eff = new ItemSetEffect;\n memset(eff, 0, sizeof(ItemSetEffect));\n eff->setid = setid;\n\n size_t x = 0;\n for (; x < player->m_ItemSetEff.size(); x++)\n if (!player->m_ItemSetEff[x])\n break;\n\n if (x < player->m_ItemSetEff.size())\n player->m_ItemSetEff[x] = eff;\n else\n player->m_ItemSetEff.push_back(eff);\n }\n\n ++eff->item_count;\n\n for (uint32 x = 0; x < 8; x++)\n {\n if (!set->spells[x])\n continue;\n // not enough for spell\n if (set->items_to_triggerspell[x] > eff->item_count)\n continue;\n\n uint32 z = 0;\n for (; z < 8; z++)\n if (eff->spells[z] && eff->spells[z]->Id == set->spells[x])\n break;\n\n if (z < 8)\n continue;\n\n // new spell\n for (auto& spell : eff->spells)\n {\n if (!spell) // free slot\n {\n SpellEntry const* spellInfo = sSpellMgr.GetSpellEntry(set->spells[x]);\n if (!spellInfo)\n {\n sLog.outError(\"WORLD: unknown spell id %u in items set %u effects\", set->spells[x], setid);\n break;\n }\n\n // spell casted only if fit form requirement, in other case will casted at form change\n player->ApplyEquipSpell(spellInfo, nullptr, true);\n spell = spellInfo;\n break;\n }\n }\n }\n}\n\nvoid RemoveItemsSetItem(Player* player, ItemPrototype const* proto)\n{\n uint32 setid = proto->ItemSet;\n\n ItemSetEntry const* set = sItemSetStore.LookupEntry(setid);\n\n if (!set)\n {\n sLog.outErrorDb(\"Item set #%u for item #%u not found, mods not removed.\", setid, proto->ItemId);\n return;\n }\n\n ItemSetEffect* eff = nullptr;\n size_t setindex = 0;\n for (; setindex < player->m_ItemSetEff.size(); setindex++)\n {\n if (player->m_ItemSetEff[setindex] && player->m_ItemSetEff[setindex]->setid == setid)\n {\n eff = player->m_ItemSetEff[setindex];\n break;\n }\n }\n\n // can be in case now enough skill requirement for set appling but set has been appliend when skill requirement not enough\n if (!eff)\n return;\n\n --eff->item_count;\n\n for (uint32 x = 0; x < 8; x++)\n {\n if (!set->spells[x])\n continue;\n\n // enough for spell\n if (set->items_to_triggerspell[x] <= eff->item_count)\n continue;\n\n for (auto& spell : eff->spells)\n {\n if (spell && spell->Id == set->spells[x])\n {\n // spell can be not active if not fit form requirement\n player->ApplyEquipSpell(spell, nullptr, false);\n spell = nullptr;\n break;\n }\n }\n }\n\n if (!eff->item_count) // all items of a set were removed\n {\n MANGOS_ASSERT(eff == player->m_ItemSetEff[setindex]);\n delete eff;\n player->m_ItemSetEff[setindex] = nullptr;\n }\n}\n\nbool ItemCanGoIntoBag(ItemPrototype const* pProto, ItemPrototype const* pBagProto)\n{\n if (!pProto || !pBagProto)\n return false;\n\n switch (pBagProto->Class)\n {\n case ITEM_CLASS_CONTAINER:\n switch (pBagProto->SubClass)\n {\n case ITEM_SUBCLASS_CONTAINER:\n return true;\n case ITEM_SUBCLASS_SOUL_CONTAINER:\n if (pProto->BagFamily != BAG_FAMILY_SOUL_SHARDS)\n"
|
|
},
|
|
{
|
|
"file_sha256": "869ed3415a393aa7e56bbb7837453ad941e1b54ad463db087c63613f5c9e2cdc",
|
|
"first_line": 37,
|
|
"last_line": 42,
|
|
"path": "/home/praxis/Servers/tortoise-wow/src/game/Objects/Item.h",
|
|
"text": "struct ItemSetEffect\n{\n uint32 setid = 0;\n uint32 item_count = 0;\n SpellEntry const* spells[8] = {};\n};\n"
|
|
},
|
|
{
|
|
"file_sha256": "8bd6214bec832f1665a127f8bbef57fc3ffe47cb53799860886bb29492a50bb6",
|
|
"first_line": 8779,
|
|
"last_line": 8855,
|
|
"path": "/home/praxis/Servers/tortoise-wow/src/game/Objects/Player.cpp",
|
|
"text": "void Player::ApplyEquipSpell(SpellEntry const* spellInfo, Item* item, bool apply, bool form_change)\n{\n if (apply)\n {\n // Cannot be used in this stance/form\n if (spellInfo->GetErrorAtShapeshiftedCast(GetShapeshiftForm()) != SPELL_CAST_OK)\n return;\n\n if (form_change) // check aura active state from other form\n {\n bool found = false;\n for (int k = 0; k < MAX_EFFECT_INDEX; ++k)\n {\n SpellAuraHolderBounds spair = GetSpellAuraHolderBounds(spellInfo->Id);\n for (SpellAuraHolderMap::const_iterator iter = spair.first; iter != spair.second; ++iter)\n {\n if (!item || iter->second->GetCastItemGuid() == item->GetObjectGuid())\n {\n found = true;\n break;\n }\n }\n if (found)\n break;\n }\n\n if (found) // and skip re-cast already active aura at form change\n return;\n }\n\n DEBUG_LOG(\"WORLD: cast %s Equip spellId - %i\", (item ? \"item\" : \"itemset\"), spellInfo->Id);\n\n CastSpell(this, spellInfo, true, item);\n }\n else\n {\n if (form_change) // check aura compatibility\n {\n // Cannot be used in this stance/form\n if (spellInfo->GetErrorAtShapeshiftedCast(GetShapeshiftForm()) == SPELL_CAST_OK)\n return; // and remove only not compatible at form change\n }\n\n if (item)\n RemoveAurasDueToItemSpell(item, spellInfo->Id); // un-apply all spells , not only at-equipped\n else\n RemoveSingleAuraDueToItemSet(spellInfo->Id); // un-apply spell (item set case)\n }\n}\n\nvoid Player::UpdateEquipSpellsAtFormChange()\n{\n for (int i = 0; i < INVENTORY_SLOT_BAG_END; ++i)\n {\n if (m_items[i] && !m_items[i]->IsBroken())\n {\n ApplyItemEquipSpell(m_items[i], false, true); // remove spells that not fit to form\n ApplyItemEquipSpell(m_items[i], true, true); // add spells that fit form but not active\n }\n }\n\n // item set bonuses not dependent from item broken state\n for (const auto eff : m_ItemSetEff)\n {\n if (!eff)\n continue;\n\n for (const auto spellInfo : eff->spells)\n {\n if (!spellInfo)\n continue;\n\n ApplyEquipSpell(spellInfo, nullptr, false, true); // remove spells that not fit to form\n ApplyEquipSpell(spellInfo, nullptr, true, true); // add spells that fit form but not active\n }\n }\n}\n"
|
|
},
|
|
{
|
|
"file_sha256": "3cb321fe39a74a612484df6d227bcd319d476d3ffd8b03e75b981ca1633468b5",
|
|
"first_line": 4205,
|
|
"last_line": 4219,
|
|
"path": "/home/praxis/Servers/tortoise-wow/src/game/Objects/Unit.cpp",
|
|
"text": "void Unit::RemoveSingleAuraDueToItemSet(uint32 spellId, AuraRemoveMode mode)\n{\n SpellAuraHolderBounds bounds = GetSpellAuraHolderBounds(spellId);\n for (SpellAuraHolderMap::iterator iter = bounds.first; iter != bounds.second;)\n {\n if (!iter->second->GetCastItemGuid())\n {\n RemoveSpellAuraHolder(iter->second, mode);\n return;\n }\n else\n ++iter;\n }\n}\n\n"
|
|
},
|
|
{
|
|
"file_sha256": "300cec368123cf0c5e48ea2184e1bcb1d7149ded7e61af4c9f3d65921b8f985d",
|
|
"first_line": 415,
|
|
"last_line": 425,
|
|
"path": "/home/praxis/Servers/tortoise-wow/src/game/Database/DBCStructure.h",
|
|
"text": "struct ItemSetEntry\n{\n //uint32 id // 0 m_ID\n char* name[8]; // 1-8 m_name_lang\n // 9 string flags\n //uint32 itemId[17]; // 10-26 m_itemID\n uint32 spells[8]; // 27-34 m_setSpellID\n uint32 items_to_triggerspell[8]; // 35-42 m_setThreshold\n uint32 required_skill_id; // 43 m_requiredSkill\n uint32 required_skill_value; // 44 m_requiredSkillRank\n};\n"
|
|
},
|
|
{
|
|
"file_sha256": "12b602cffa06abf6217ae4ac6b6075c088f8b3ebb0373ed5347e4651e2705fe9",
|
|
"first_line": 60,
|
|
"last_line": 63,
|
|
"path": "/home/praxis/Servers/tortoise-wow/src/game/Database/DBCStores.cpp",
|
|
"text": "//DBCStorage <ItemDisplayInfoEntry> sItemDisplayInfoStore(ItemDisplayTemplateEntryfmt); -- not used currently\nDBCStorage <ItemRandomPropertiesEntry> sItemRandomPropertiesStore(ItemRandomPropertiesfmt);\nDBCStorage <ItemSetEntry> sItemSetStore(ItemSetEntryfmt);\nDBCStorage <LockEntry> sLockStore(LockEntryfmt);\n"
|
|
},
|
|
{
|
|
"file_sha256": "12b602cffa06abf6217ae4ac6b6075c088f8b3ebb0373ed5347e4651e2705fe9",
|
|
"first_line": 207,
|
|
"last_line": 215,
|
|
"path": "/home/praxis/Servers/tortoise-wow/src/game/Database/DBCStores.cpp",
|
|
"text": " LoadDBC(availableDbcLocales, badDbcFiles, sEmotesStore, dbcPath, \"Emotes.dbc\");\n LoadDBC(availableDbcLocales, badDbcFiles, sEmotesTextStore, dbcPath, \"EmotesText.dbc\");\n LoadDBC(availableDbcLocales, badDbcFiles, sGameObjectDisplayInfoStore, dbcPath, \"GameObjectDisplayInfo.dbc\");\n LoadDBC(availableDbcLocales, badDbcFiles, sItemBagFamilyStore, dbcPath, \"ItemBagFamily.dbc\");\n LoadDBC(availableDbcLocales, badDbcFiles, sItemRandomPropertiesStore, dbcPath, \"ItemRandomProperties.dbc\");\n LoadDBC(availableDbcLocales, badDbcFiles, sItemSetStore, dbcPath, \"ItemSet.dbc\");\n LoadDBC(availableDbcLocales, badDbcFiles, sLockStore, dbcPath, \"Lock.dbc\");\n\n LoadDBC(availableDbcLocales, badDbcFiles, sNamesProfanityStore, dbcPath, \"NamesProfanity.dbc\");\n"
|
|
},
|
|
{
|
|
"file_sha256": "3887321a46c39aafc30498894ea1763fb115674c6d35ca08479ad9f8b5ac80ef",
|
|
"first_line": 47,
|
|
"last_line": 47,
|
|
"path": "/home/praxis/Servers/tortoise-wow/src/game/Database/DBCfmt.h",
|
|
"text": "const char ItemSetEntryfmt[]=\"dssssssssxxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiiiiii\";\n"
|
|
}
|
|
]
|