Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
Fix: Battle list vocations (#1690)
Browse files Browse the repository at this point in the history
Add possibility to change vocations to be shown on battle list.
@FakeShinoda credits.
  • Loading branch information
marcosvf132 authored Aug 27, 2020
1 parent 5ab402f commit edd9dee
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3638,9 +3638,14 @@ void ProtocolGame::AddCreature(NetworkMessage& msg, const Creature* creature, bo
}
}

if (creatureType == CREATURETYPE_PLAYER) {
msg.addByte(0);
}
if (creatureType == CREATURETYPE_PLAYER) {
const Player* otherCreature = creature->getPlayer();
if (otherCreature) {
msg.addByte(otherCreature->getVocation()->getClientId());
} else {
msg.addByte(0);
}
}

msg.addByte(creature->getSpeechBubble());
msg.addByte(0xFF); // MARK_UNMARKED
Expand Down

0 comments on commit edd9dee

Please sign in to comment.