Add server model metadata for custom pets

This commit is contained in:
2026-07-23 01:25:12 +04:00
parent 790506fc7a
commit 7291fff664
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -76,6 +76,6 @@
3. Перезапустить worldserver: DBC и таблицы `spell_dbc` загружаются только при старте.
4. Для проверки изучить выданный spell командой `.learn <summonSpellID>`.
SQL создаёт `creature_template`, `creature_template_model`, companion spell и строку skill line.
SQL создаёт `creature_template`, `creature_model_info`, `creature_template_model`, companion spell и строку skill line.
Генерация полноценного mount spell для секции `mounts` остаётся отдельным этапом: mount требует
другой spell-шаблон с аурами скорости и `SPELL_AURA_MOUNTED`.
+5 -1
View File
@@ -597,11 +597,15 @@ fn generate_server_sql(entries: &[PreparedEntry]) -> Result<String, Box<dyn Erro
(entry,name,minlevel,maxlevel,faction,speed_walk,speed_run,scale,unit_class,unit_flags,unit_flags2,type,MovementType,RegenHealth,VerifiedBuild)\n\
VALUES ({creature},{name_en},1,1,188,1,1.14286,1,1,0,2048,12,0,1,12340)\n\
ON DUPLICATE KEY UPDATE name=VALUES(name),faction=VALUES(faction),type=VALUES(type),unit_flags2=VALUES(unit_flags2);\n\
INSERT INTO creature_model_info\n\
(DisplayID,BoundingRadius,CombatReach,Gender,DisplayID_Other_Gender,VerifiedBuild)\n\
VALUES ({},0.25,0.5,2,0,12340)\n\
ON DUPLICATE KEY UPDATE BoundingRadius=VALUES(BoundingRadius),CombatReach=VALUES(CombatReach),Gender=VALUES(Gender),DisplayID_Other_Gender=VALUES(DisplayID_Other_Gender),VerifiedBuild=VALUES(VerifiedBuild);\n\
INSERT INTO creature_template_model\n\
(CreatureID,Idx,CreatureDisplayID,DisplayScale,Probability,VerifiedBuild)\n\
VALUES ({creature},0,{},1,1,12340)\n\
ON DUPLICATE KEY UPDATE CreatureDisplayID=VALUES(CreatureDisplayID),DisplayScale=VALUES(DisplayScale),Probability=VALUES(Probability);\n\n",
entry.key, entry.ids.display_info_id
entry.key, entry.ids.display_info_id, entry.ids.display_info_id
));
sql.push_str(&format!(
"INSERT INTO spell_dbc\n\