mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-04-30 01:29:21 +02:00
fix runeFunction
This commit is contained in:
parent
a3cb7f6d32
commit
24f95d7094
@ -1808,10 +1808,8 @@ bool RuneSpell::executeUse(Player* player, Item* item, const Position&, Thing* t
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!scripted) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool result = false;
|
||||
if (scripted) {
|
||||
LuaVariant var;
|
||||
|
||||
if (needTarget) {
|
||||
@ -1835,7 +1833,12 @@ bool RuneSpell::executeUse(Player* player, Item* item, const Position&, Thing* t
|
||||
var.pos = toPosition;
|
||||
}
|
||||
|
||||
if (!internalCastSpell(player, var, isHotkey)) {
|
||||
result = internalCastSpell(player, var, isHotkey);
|
||||
} else if (runeFunction) {
|
||||
result = runeFunction(this, player, toPosition);
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user