Martin,
I did try adding breaks and a PRINT statement andd they didnot show in the log but it kept going to armydata and i found this which might be why its only looking at the attack, but looking at how the event is called I don't think I should add a sneakattack here instead of the regard file I've been messing with. Or am i wrong?
Code:
sint32 ArmyData::Fight(CellUnitList &defender)
...SOMECODE...
if(defenderSucks) {
if(ta.IsValid()) {
g_director->AddAttack(ta, td);
g_gevManager->AddEvent(GEV_INSERT_AfterCurrent,
GEV_BattleAftermath,
GEA_Army, m_id,
GEA_MapPoint, pos,
GEA_Unit, ta,
GEA_Unit, td,
GEA_Player, m_owner,
GEA_Player, defense_owner,
GEA_Int, 0,
GEA_End);
for(i = 0; i < defender.Num(); i++) {
CAUSE_REMOVE_ARMY cause = CAUSE_REMOVE_ARMY_DIED_IN_ATTACK;
if(defender[i ].m_id == td.m_id) {
cause = CAUSE_REMOVE_ARMY_DIED_IN_ATTACK_ON_TOP;
}
g_gevManager->AddEvent(GEV_INSERT_AfterCurrent,
GEV_KillUnit,
GEA_Unit, defender[i ].m_id,
GEA_Int, cause,
GEA_Player, m_owner,
GEA_End);
}
}
...SOMECODE...
Bookmarks