• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Damage Counter(LEAD/ANTI-LEAD)

Status
Not open for further replies.
Experienced Elementalist
Joined
Oct 23, 2011
Messages
271
Reaction score
118
WARNING : Lead damage counter is not accurate.

NOTE: You can easily implement this with your anti lead code.

ZCharacter.h Ln 262.
Code:
int			nDamageCount;
int			nTakenDamage;

ZCharacter.h Ln 282.
Code:
							nDamageCount(0),
nTakenDamage(0),

ZModule_HPAP.cpp Ln 45.
Code:
        ZCharacter* pCharacter = ZGetGame()->m_pMyCharacter;
	if(uidAttacker.Low == ZGetGame()->m_pMyCharacter->GetUID().Low)
	{
		pCharacter->GetStatus().CheckCrc();
		pCharacter->GetStatus().Ref().nDamageCount += fDamage;
		pCharacter->GetStatus().MakeCrc();
	}

	if(uidAttacker.Low == ZGetGame()->m_pMyCharacter->GetLastAttacker().Low)
	{
		pCharacter->GetStatus().CheckCrc();
		pCharacter->GetStatus().Ref().nTakenDamage += fDamage;
		pCharacter->GetStatus().MakeCrc();
	}

Easy to implement with anti lead just take the same dmg recording info and put the details from your anti lead /done.

this can also easily be printed out as a command

EX:
Code:
void ChatCmd_Damaged(const char* line, const int argc, char **const argv)
{
	GunzState state = ZApplication::GetGameInterface()->GetState();
	ZMyCharacter* m_pMyCharacter = ZGetGame()->m_pMyCharacter;
	ZCharacterStatus dInfo = m_pMyCharacter->GetStatus().Ref();

	char szPrint[256];

	if(state == GUNZ_GAME)
	{
		sprintf(szPrint, "Damage Dealt: %i / Damage Received: %i", dInfo.nDamageCount, dInfo.nTakenDamage);
		ZApplication::GetGameInterface()->GetChat()->Input(szPrint);
	}
	else
	{
		sprintf(szPrint, "^1You need to be in-game!");
		ZChatOutput(szPrint);
		return;
	}
}
 
Last edited:
Status
Not open for further replies.
Back
Top