[DiscordArchive] unit.cpp-> unit::DealDamage(){...
[DiscordArchive] unit.cpp-> unit::DealDamage(){...
ealDamage(){...Archived author: gemini • Posted: 2024-07-27T14:42:40.091000+00:00
Original source
unit.cpp-> unit:
ealDamage(){...
if (Player* player = victim->ToPlayer())
if (player->GetCommandStatus(CHEAT_GOD))
return 0;
...
}
Certainly appears that there should be no actual dmg.
However, before this code, I see:
// Hook for OnDamage Event
sScriptMgr->OnDamage(attacker, victim, **damage**);
So I suspect OnDamage() is reporting dmg that is subsequently zero'd out... making it more or less a display issue?
Archived author: gemini • Posted: 2024-07-27T14:43:50.334000+00:00
Original source
yes- well- then why bother with docs at all if we don't care about accuracy?
Archived author: jackpoz • Posted: 2024-07-27T14:44:21.249000+00:00
Original source
docs are a copy of the code fixed in time
Archived author: jackpoz • Posted: 2024-07-27T14:44:32.352000+00:00
Original source
when the code changes, docs don't change automatically
Archived author: jackpoz • Posted: 2024-07-27T14:44:44.178000+00:00
Original source
if you want to know how something works, check the code
Archived author: gemini • Posted: 2024-07-27T14:55:24.294000+00:00
Original source
You realize you're basically telling me not to ask questions.
Archived author: gemini • Posted: 2024-07-27T15:00:17.134000+00:00
Original source
code:
void ScriptMgr::OnDamage(Unit* attacker, Unit* victim, uint32& damage)
{
FOREACH_SCRIPT(UnitScript)->OnDamage(attacker, victim, damage);
}
So OnDamage() is specific to individual scripts. So how do I determine the specific script in question when an NPC, Creature, etc. is attacking me?