mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-03 20:03:50 +00:00
fix: hearthstone from action bar, far teleport loading screen
Action bar hearthstone: the slot was type SPELL (spell 8690) not ITEM. castSpell sends CMSG_CAST_SPELL which the server rejects for item-use spells. Now detects item-use spells via getItemIdForSpell() and routes through useItemById() instead, sending CMSG_USE_ITEM correctly. Far same-map teleport: hearthstone on the same continent (e.g., Westfall → Stormwind on Azeroth) skipped the loading screen, so the player fell through unloaded terrain. Now triggers a full world reload with loading screen for teleports > 500 units, with the warmup ground check ensuring WMO floors are loaded before spawning.
This commit is contained in:
parent
4e709692f1
commit
11571c582b
4 changed files with 54 additions and 6 deletions
|
|
@ -9366,8 +9366,15 @@ void GameScreen::renderActionBar(game::GameHandler& gameHandler) {
|
|||
actionBarDragIcon_ = 0;
|
||||
} else if (clicked && !slot.isEmpty()) {
|
||||
if (slot.type == game::ActionBarSlot::SPELL && slot.isReady()) {
|
||||
uint64_t target = gameHandler.hasTarget() ? gameHandler.getTargetGuid() : 0;
|
||||
gameHandler.castSpell(slot.id, target);
|
||||
// Check if this spell belongs to an item (e.g., Hearthstone spell 8690).
|
||||
// Item-use spells must go through CMSG_USE_ITEM, not CMSG_CAST_SPELL.
|
||||
uint32_t itemForSpell = gameHandler.getItemIdForSpell(slot.id);
|
||||
if (itemForSpell != 0) {
|
||||
gameHandler.useItemById(itemForSpell);
|
||||
} else {
|
||||
uint64_t target = gameHandler.hasTarget() ? gameHandler.getTargetGuid() : 0;
|
||||
gameHandler.castSpell(slot.id, target);
|
||||
}
|
||||
} else if (slot.type == game::ActionBarSlot::ITEM && slot.id != 0) {
|
||||
gameHandler.useItemById(slot.id);
|
||||
} else if (slot.type == game::ActionBarSlot::MACRO) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue