Fix player state issue after failing to complete a mission

Fixes #225.

Co-authored-by: Jade <jadeshrinemaiden@gmail.com>
This commit is contained in:
2022-02-11 17:45:08 +01:00
parent 28bfd14362
commit 00865e1c7b
2 changed files with 20 additions and 6 deletions

View File

@@ -226,7 +226,7 @@ void Combat::killMob(CNSocket *sock, Mob *mob) {
mob->killedTime = getTime(); // XXX: maybe introduce a shard-global time for each step?
// check for the edge case where hitting the mob did not aggro it
if (sock != nullptr && PlayerManager::players.find(sock) != PlayerManager::players.end()) {
if (sock != nullptr) {
Player* plr = PlayerManager::getPlayer(sock);
Items::DropRoll rolled;