Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modules/game_actionbar/game_actionbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,10 @@ function onSpellCooldown(spellId, duration)
local slot
for v, k in pairs(actionBarPanel:getChildren()) do
local spell, profile, spellName = Spells.getSpellByIcon(spellId)
if not spell then
print('[WARNING] Can not set cooldown on spell with id: ' .. spellId)
return true
end
if k.words == spell.words or spell.clientId and spell.clientId == k.itemId then
slot = k
local progressRect = slot:recursiveGetChildById('progress' .. spell.id)
Expand Down
4 changes: 2 additions & 2 deletions src/client/protocolgameparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1882,7 +1882,7 @@ void ProtocolGame::parsePlayerModes(const InputMessagePtr& msg)

void ProtocolGame::parseSpellCooldown(const InputMessagePtr& msg)
{
uint16_t spellId = msg->getU8();
uint16_t spellId;
if (g_game.getFeature(Otc::GameUshortSpell)) {
spellId = msg->getU16();
} else {
Expand Down Expand Up @@ -3871,4 +3871,4 @@ void ProtocolGame::parseMapShader(const InputMessagePtr& msg) {
const auto& mapView = g_map.getMapView(0);
if (mapView)
mapView->setShader(shaderName, 0.f, 0.f);
}
}