fix: send HeroDeletedEvent only if hero actually removed
This commit is contained in:
parent
2c475e69f3
commit
b948273172
@ -33,7 +33,7 @@ namespace Interlude
|
||||
}
|
||||
result[hero->objectId] = m_Hero;
|
||||
}
|
||||
else {
|
||||
else if (m_Hero) {
|
||||
m_Hero = nullptr;
|
||||
EventDispatcher::GetInstance().Dispatch(HeroDeletedEvent{});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user