Skip to content

Commit

Permalink
Fix build in linux (opentibiabr#1223)
Browse files Browse the repository at this point in the history
Fixes comparison that was breaking the builds on Linux

Signed-off-by: Renato Foot <[email protected]>
  • Loading branch information
Costallat authored May 14, 2020
1 parent dc69309 commit e0c7adb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2603,7 +2603,7 @@ void ProtocolGame::sendMagicEffect(const Position& pos, uint8_t type)

void ProtocolGame::sendCreatureHealth(const Creature* creature)
{
if (player->getProtocolVersion() >= 1120 && creature->isHealthHidden()) {
if (player->getProtocolVersion() >= 1120 && creature->isHealthHidden()) {
// on newer clients, sending health 0 causes it to show the creature name with an empty healthbar
return;
}
Expand Down Expand Up @@ -2748,7 +2748,8 @@ void ProtocolGame::sendAddCreature(const Creature* creature, const Position& pos

if (isLogin) {
if (const Player* creaturePlayer = creature->getPlayer()) {
if (!creaturePlayer->isAccessPlayer() || !creaturePlayer->getAccountType() >= ACCOUNT_TYPE_NORMAL)
if (!creaturePlayer->isAccessPlayer() ||
creaturePlayer->getAccountType() == ACCOUNT_TYPE_NORMAL)
sendMagicEffect(pos, CONST_ME_TELEPORT);
} else {
sendMagicEffect(pos, CONST_ME_TELEPORT);
Expand All @@ -2762,7 +2763,7 @@ void ProtocolGame::sendAddCreature(const Creature* creature, const Position& pos
msg.addByte(0x17);

msg.add<uint32_t>(player->getID());
msg.add<uint16_t>(0x32); // beat duration (50)
msg.add<uint16_t>(0x32); // beat duration (50)

msg.addDouble(Creature::speedA, 3);
msg.addDouble(Creature::speedB, 3);
Expand Down

0 comments on commit e0c7adb

Please sign in to comment.