mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-21 07:22:02 -04:00
Core/NPCs: Refactor equipments
- creature_template.equipment_id deleted - creature_equip_template.entry == creature_template.entry - id field added to creature_equip_template -> PK(entry, id) - id field in creature_equip_template starts at 1 - creature.equipment_id references id of creature_equip_template - creature.equipment_id = 0 means no equipment at all (default 1) - creature.equipment_id = -1 means pick a random equipment from creature_equip_template - add equipment info to .npc info command While table creature_equip_template got bigger in size, this system is easier to mantain and allows creatures to have a random template from a group of equipments
This commit is contained in:
@@ -370,9 +370,7 @@ void ScriptedAI::SetEquipmentSlots(bool loadDefault, int32 mainHand /*= EQUIP_NO
|
||||
{
|
||||
if (loadDefault)
|
||||
{
|
||||
if (CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(me->GetEntry()))
|
||||
me->LoadEquipment(creatureInfo->equipmentId, true);
|
||||
|
||||
me->LoadEquipment(me->GetOriginalEquipmentId(), true);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user