public CombatPresence(AuroraCombatModule module, IScenePresence SP, IConfig m_config) { m_SP = SP; m_combatModule = module; FireOnDeadEvent = m_config.GetBoolean("FireDeadEvent", false); AllowTeamKilling = m_config.GetBoolean("AllowTeamKilling", true); AllowTeams = m_config.GetBoolean("AllowTeams", false); SendTeamKillerInfo = m_config.GetBoolean("SendTeamKillerInfo", false); TeamHitsBeforeSend = m_config.GetFloat("TeamHitsBeforeSend", 3); DamageToTeamKillers = m_config.GetFloat("DamageToTeamKillers", 100); MaximumHealth = m_config.GetFloat("MaximumHealth", 100); MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100); m_RespawnPosition.X = m_config.GetFloat("RespawnPositionX", 128); m_RespawnPosition.Y = m_config.GetFloat("RespawnPositionY", 128); m_RespawnPosition.Z = m_config.GetFloat("RespawnPositionZ", 128); m_SecondsBeforeRespawn = m_config.GetInt("SecondsBeforeRespawn", 5); m_shouldRespawn = m_config.GetBoolean("ShouldRespawn", false); HasLeftCombat = false; m_Team = "No Team"; SP.OnAddPhysics += SP_OnAddPhysics; SP.OnRemovePhysics += SP_OnRemovePhysics; //Use this to fix the avatars health m_healthtimer.Interval = 1000; // 1 sec m_healthtimer.Enabled = true; m_healthtimer.Elapsed += new System.Timers.ElapsedEventHandler(fixAvatarHealth_Elapsed); }
public void Close() { m_combatModule = null; m_healthtimer.Stop(); m_healthtimer.Close(); m_SP.OnAddPhysics -= SP_OnAddPhysics; m_SP.OnRemovePhysics -= SP_OnRemovePhysics; SP_OnRemovePhysics(); m_SP = null; }
public CombatObject(AuroraCombatModule module, SceneObjectPart part, IConfig m_config) { m_part = part; m_combatModule = module; MaximumHealth = m_config.GetFloat("MaximumHealth", 100); MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100); m_Team = "No Team"; m_part.OnAddPhysics += AddPhysics; m_part.OnRemovePhysics += RemovePhysics; }
public CombatPresence(AuroraCombatModule module, ScenePresence SP, IConfig m_config) { m_SP = SP; m_combatModule = module; FireOnDeadEvent = m_config.GetBoolean("FireDeadEvent", false); AllowTeamKilling = m_config.GetBoolean("AllowTeamKilling", true); AllowTeams = m_config.GetBoolean("AllowTeams", false); SendTeamKillerInfo = m_config.GetBoolean("SendTeamKillerInfo", false); TeamHitsBeforeSend = m_config.GetFloat("TeamHitsBeforeSend", 3); DamageToTeamKillers = m_config.GetFloat("DamageToTeamKillers", 100); MaximumHealth = m_config.GetFloat("MaximumHealth", 100); MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100); m_RespawnPosition.X = m_config.GetFloat("RespawnPositionX", 128); m_RespawnPosition.Y = m_config.GetFloat("RespawnPositionY", 128); m_RespawnPosition.Z = m_config.GetFloat("RespawnPositionZ", 128); m_SecondsBeforeRespawn = m_config.GetInt("SecondsBeforeRespawn", 5); m_shouldRespawn = m_config.GetBoolean("ShouldRespawn", false); HasLeftCombat = false; m_Team = "No Team"; SP.OnAddPhysics += new ScenePresence.AddPhysics(SP_OnAddPhysics); SP.OnRemovePhysics += new ScenePresence.RemovePhysics(SP_OnRemovePhysics); }
public void Close() { m_healthtimer.Stop(); m_healthtimer.Close(); m_SP.OnAddPhysics -= SP_OnAddPhysics; m_SP.OnRemovePhysics -= SP_OnRemovePhysics; SP_OnRemovePhysics(); m_combatModule = null; m_SP = null; }
public CombatPresence(AuroraCombatModule module, IScenePresence SP, IConfig m_config) { m_SP = SP; m_combatModule = module; HasLeftCombat = false; m_Team = "No Team"; SP.OnAddPhysics += SP_OnAddPhysics; SP.OnRemovePhysics += SP_OnRemovePhysics; //Use this to fix the avatars health m_healthtimer.Interval = 1000; // 1 sec m_healthtimer.Elapsed += fixAvatarHealth_Elapsed; m_healthtimer.Start(); }
public CombatPresence (AuroraCombatModule module, IScenePresence SP, IConfig m_config) { m_SP = SP; m_combatModule = module; FireOnDeadEvent = m_config.GetBoolean("FireDeadEvent", false); AllowTeamKilling = m_config.GetBoolean("AllowTeamKilling", true); AllowTeams = m_config.GetBoolean("AllowTeams", false); SendTeamKillerInfo = m_config.GetBoolean("SendTeamKillerInfo", false); TeamHitsBeforeSend = m_config.GetFloat("TeamHitsBeforeSend", 3); DamageToTeamKillers = m_config.GetFloat("DamageToTeamKillers", 100); MaximumHealth = m_config.GetFloat("MaximumHealth", 100); MaximumDamageToInflict = m_config.GetFloat("MaximumDamageToInflict", 100); m_RespawnPosition.X = m_config.GetFloat("RespawnPositionX", 128); m_RespawnPosition.Y = m_config.GetFloat("RespawnPositionY", 128); m_RespawnPosition.Z = m_config.GetFloat("RespawnPositionZ", 128); m_SecondsBeforeRespawn = m_config.GetInt("SecondsBeforeRespawn", 5); m_shouldRespawn = m_config.GetBoolean("ShouldRespawn", false); HasLeftCombat = false; m_Team = "No Team"; SP.OnAddPhysics += SP_OnAddPhysics; SP.OnRemovePhysics += SP_OnRemovePhysics; //Use this to fix the avatars health m_healthtimer.Interval = 1000; // 1 sec m_healthtimer.Enabled = true; m_healthtimer.Elapsed += new System.Timers.ElapsedEventHandler (fixAvatarHealth_Elapsed); }