Forgottenserver: Monster loot message small or BIG bug

Created on 17 May 2017  路  2Comments  路  Source: otland/forgottenserver

delete

invalid

Most helpful comment

Is this a joke issue?

if (!owner || owner->getStaminaMinutes() > 840) means - if there is no owner or there is an owner with staminaMinutes > 840.
If there is no owner the stamina check is not executed, it skips it immediately.

Also, if there is no owner there is additional check where needed before accessing owner pointer: https://github.com/otland/forgottenserver/blob/08ee113030aaad0d72957792c6d51dc959d95553/src/monsters.cpp#L79-L88

https://en.wikipedia.org/wiki/Short-circuit_evaluation

All 2 comments

Is this a joke issue?

if (!owner || owner->getStaminaMinutes() > 840) means - if there is no owner or there is an owner with staminaMinutes > 840.
If there is no owner the stamina check is not executed, it skips it immediately.

Also, if there is no owner there is additional check where needed before accessing owner pointer: https://github.com/otland/forgottenserver/blob/08ee113030aaad0d72957792c6d51dc959d95553/src/monsters.cpp#L79-L88

https://en.wikipedia.org/wiki/Short-circuit_evaluation

@EvulMastah
Didn't see line 79. This is how ends working for 16 hours.. :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

irenicus30 picture irenicus30  路  5Comments

GoularPink picture GoularPink  路  4Comments

zeeb92 picture zeeb92  路  4Comments

souzajunior picture souzajunior  路  4Comments

Zbizu picture Zbizu  路  5Comments