Exemplo n.º 1
0
void CombatWindow::addCombatRecord(int iTargetID, int iSourceID, int iType, int iSpell, int iDamage)
{
#ifdef DEBUGCOMBAT
	printf("CombatWindow::addCombatRecord starting...\n");
	printf("target=%d, source=%d, type=%d, spell=%d, damage=%d\n",
			iTargetID, iSourceID, iType, iSpell, iDamage);
#endif

	int iPlayerID = m_player->id();

	//	The one case we won't handle (for now) is where the Target
	//	and Source are the same.

	if(iTargetID == iPlayerID && iSourceID != iPlayerID)
	{
		addDefenseRecord(iDamage);
		updateDefense();
		addMobRecord(iTargetID, iSourceID, iDamage);
		updateMob();
	}
	else if(iSourceID == iPlayerID && iTargetID != iPlayerID)
	{
		addOffenseRecord(iType, iDamage);
		updateOffense();
		addMobRecord(iTargetID, iSourceID, iDamage);
		updateMob();

		if(iDamage > 0)
			updateDPS(iDamage);
	}

#ifdef DEBUGCOMBAT
	printf("CombatWindow::addCombatRecord finished...\n");
#endif
}
Exemplo n.º 2
0
void CombatWindow::addCombatRecord(int iTargetID, int iSourceID, int iType, int iSpell, int iDamage, QString tName, QString sName)
{
#ifdef DEBUGCOMBAT
	seqDebug("CombatWindow::addCombatRecord starting...");
	seqDebug("target=%d, source=%d, type=%d, spell=%d, damage=%d",
			iTargetID, iSourceID, iType, iSpell, iDamage);
#endif

	int iPlayerID = m_player->id();

	//	The one case we won't handle (for now) is where the Target
	//	and Source are the same.

	if(iTargetID == iPlayerID && iSourceID != iPlayerID)
	{
		addDefenseRecord(iDamage);
		updateDefense();
		addMobRecord(iTargetID, iSourceID, iDamage, tName, sName);
		updateMob();
	}
	else if(iSourceID == iPlayerID && iTargetID != iPlayerID)
	{
		addOffenseRecord(iType, iDamage, iSpell);
		updateOffense();
		// Belith -- Lets not add buffs, etc
		if ((iType == 231 && iDamage > 0) || iType != 231) {
			addMobRecord(iTargetID, iSourceID, iDamage, tName, sName);
			updateMob();
		}

		if(iDamage > 0)
			updateDPS(iDamage);
	}

#ifdef DEBUGCOMBAT
	seqDebug("CombatWindow::addCombatRecord finished...");
#endif
}