Description:
Sometimes, somehow, player weapon damage is reduced too much and a relog will fix the issue. It happens very rarely.
Current behaviour:
As i said before. Here is an example ( his weapon damage should be around 1100 ):


Branch(es): 3.3.5
TC rev. hash/commit: aef5f8e
TDB version: TDB 335.63
Operating system: Ubuntu 17.10
Do you know how to reproduce? (ie possible buffs/debuffs you may have had at the time, if you were disarmed, etc.)
Equip a weapon and an amor, then unequip the amor, now you can find your weapon damage disappeared.
I fixed it, the prolem is in Player::_ApplyWeaponDamage from ver. f1986c6aafdf2457902a7a4cc7acc903cbbdc7bb .
I moved 'if (!apply)' into 'for (uint8 i = 0; i < MAX_ITEM_PROTO_DAMAGES; ++i)', and changed 'SetBaseWeaponDamage(attType, MINDAMAGE, BASE_MINDAMAGE, 0);' to 'SetBaseWeaponDamage(attType, MINDAMAGE, BASE_MINDAMAGE, i);', changed 'SetBaseWeaponDamage(attType, MINDAMAGE, BASE_MAXDAMAGE, 0);' to 'SetBaseWeaponDamage(attType, MINDAMAGE, BASE_MAXDAMAGE, i);', deleted 'SetBaseWeaponDamage(attType, MINDAMAGE, 0.f, 1);' and 'SetBaseWeaponDamage(attType, MAXDAMAGE, 0.f, 1);'.
That's bad, secondary damage type must be 0 if no weapon present
The problem here is _ApplyWeaponDamage being called from non-weapon slots (like the case of armor, armor gets removed, proto->Damage is 0 in that case)
Most helpful comment
Equip a weapon and an amor, then unequip the amor, now you can find your weapon damage disappeared.