forked from github/server
Zauber trollbelt war verloren gegangen.
find_spellbyid bekommt ein Fallback für Zauber, die die ID gewechselt haben.
This commit is contained in:
parent
2e897bfbf7
commit
ea8539cb15
|
@ -7596,6 +7596,27 @@ get_spellfromtoken(unit *u, const char *name, const struct locale * lang)
|
||||||
spell *
|
spell *
|
||||||
find_spellbyid(spellid_t id)
|
find_spellbyid(spellid_t id)
|
||||||
{
|
{
|
||||||
|
struct {
|
||||||
|
spellid_t id;
|
||||||
|
const char * name;
|
||||||
|
magic_t mtype;
|
||||||
|
} * oldspell, oldspells[] = {
|
||||||
|
{ LUASPL_ARTEFAKT_NIMBLEFINGERRING, "create_roqf", M_BARDE },
|
||||||
|
{ LUASPL_ARTEFAKT_SACK_OF_CONSERVATION, "create_magicherbbag", M_DRUIDE },
|
||||||
|
{ LUASPL_FIRESWORD, "create_firesword", M_CHAOS },
|
||||||
|
{ LUASPL_INVISIBILITY_CERDDOR, "create_roi", M_BARDE },
|
||||||
|
{ LUASPL_INVISIBILITY_DRAIG, "create_roi", M_CHAOS },
|
||||||
|
{ LUASPL_INVISIBILITY_GWYRRD, "create_roi", M_DRUIDE },
|
||||||
|
{ LUASPL_INVISIBILITY_ILLAUN, "create_roi", M_TRAUM },
|
||||||
|
{ LUASPL_INVISIBILITY_TYBIED, "create_roi", M_ASTRAL },
|
||||||
|
{ LUASPL_STRENGTH, "create_trollbelt", M_CHAOS },
|
||||||
|
{ LUASPL_TRUESEEING_CERDDOR, "create_aots", M_BARDE },
|
||||||
|
{ LUASPL_TRUESEEING_DRAIG, "create_aots", M_CHAOS },
|
||||||
|
{ LUASPL_TRUESEEING_GWYRRD, "create_aots", M_DRUIDE },
|
||||||
|
{ LUASPL_TRUESEEING_ILLAUN, "create_aots", M_TRAUM },
|
||||||
|
{ LUASPL_TRUESEEING_TYBIED, "create_aots", M_ASTRAL },
|
||||||
|
{ 0, NULL, 0 }
|
||||||
|
};
|
||||||
spell_list * slist;
|
spell_list * slist;
|
||||||
|
|
||||||
assert(id>=0);
|
assert(id>=0);
|
||||||
|
@ -7608,6 +7629,10 @@ find_spellbyid(spellid_t id)
|
||||||
spell* sp = slist->data;
|
spell* sp = slist->data;
|
||||||
if (sp->id == id) return sp;
|
if (sp->id == id) return sp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (oldspell=oldspells;oldspell->name;++oldspell) {
|
||||||
|
if (oldspell->id==id) return find_spell(oldspell->mtype, oldspell->name);
|
||||||
|
}
|
||||||
log_warning(("cannot find spell by id: %u\n", id));
|
log_warning(("cannot find spell by id: %u\n", id));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,12 @@
|
||||||
<resource name="permaura" amount="1" cost="fixed"/>
|
<resource name="permaura" amount="1" cost="fixed"/>
|
||||||
</spell>
|
</spell>
|
||||||
|
|
||||||
|
<spell name="create_trollbelt" type="draig" ship="true" rank="5" level="9">
|
||||||
|
<function name="cast" value="luaspell"/>
|
||||||
|
<resource name="aura" amount="20" cost="fixed"/>
|
||||||
|
<resource name="dragonblood" amount="1" cost="fixed"/>
|
||||||
|
</spell>
|
||||||
|
|
||||||
<!-- gwyrrd spells -->
|
<!-- gwyrrd spells -->
|
||||||
<spell name="create_roi" type="gwyrrd" ship="true" rank="5" level="6">
|
<spell name="create_roi" type="gwyrrd" ship="true" rank="5" level="6">
|
||||||
<function name="cast" value="luaspell"/>
|
<function name="cast" value="luaspell"/>
|
||||||
|
|
Loading…
Reference in New Issue