Skip to content

Commit 74b798c

Browse files
authored
fix(Scripts/World): Arcane Charges (azerothcore#25806)
1 parent ffc5094 commit 74b798c

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

src/server/scripts/World/item_scripts.cpp

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,25 @@ class item_only_for_flight : public ItemScript
5252
if (player->GetZoneId() != AREA_ISLE_OF_QUEL_DANAS)
5353
disabled = true;
5454
break;
55-
case 34475:
56-
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_ARCANE_CHARGES))
57-
Spell::SendCastResult(player, spellInfo, 1, SPELL_FAILED_NOT_ON_GROUND);
58-
break;
5955
}
6056

6157
// allow use in flight only
62-
if (player->IsInFlight() && !disabled)
63-
return false;
58+
if (player->IsInFlight())
59+
{
60+
if (!disabled)
61+
return false;
62+
}
63+
else // error
64+
{
65+
if (itemId == 34475)
66+
{
67+
if (SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_ARCANE_CHARGES))
68+
Spell::SendCastResult(player, spellInfo, 1, SPELL_FAILED_NOT_ON_GROUND);
69+
}
70+
else
71+
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
72+
}
6473

65-
// error
66-
player->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, item, nullptr);
6774
return true;
6875
}
6976
};

0 commit comments

Comments
 (0)