private void GameObject_OnDelete(GameObject sender, EventArgs args) { if (sender.IsEnemy || sender.Type != GameObjectType.MissileClient && !sender.IsValid) { return; } var missile = sender as MissileClient; if (missile.SData.Name != null) { if (missile.SData.Name.ToLower() == MissileReturnName.ToLower()) { Missile = null; } } }
private void Obj_SpellMissile_OnDelete(GameObject sender, EventArgs args) { if (sender.IsEnemy || sender.Type != GameObjectType.MissileClient || !sender.IsValid <MissileClient>()) { return; } MissileClient missile = (MissileClient)sender; if (missile.SData.Name != null) { if (missile.SData.Name.ToLower() == MissileReturnName.ToLower()) { Missile = null; } } }
private void GameObject_OnMissileCreate(GameObject sender, EventArgs args) { if (sender.IsEnemy || sender.Type != GameObjectType.MissileClient || !sender.IsValid) { return; } var missile = (MissileClient)sender; if (missile.SData.Name != null) { if (missile.SData.Name.ToLower() == MissileName.ToLower() || missile.SData.Name.ToLower() == MissileReturnName.ToLower()) { Missile = missile; } } }