/// <summary> /// Creates the data for the specified row. /// </summary> internal LogicData Create(Row row) { LogicData data; switch (this.Index) { case 1: { data = new LogicLocaleData(row, this); break; } case 2: { data = new LogicResourceData(row, this); break; } case 3: { data = new LogicEffectData(row, this); break; } case 4: { data = new LogicParticleEmitterData(row, this); break; } case 5: { data = new LogicGlobalData(row, this); break; } case 6: { data = new LogicQuestData(row, this); break; } case 8: { data = new LogicAchievementData(row, this); break; } case 10: { data = new LogicWorldData(row, this); break; } case 11: { data = new LogicHeroData(row, this); break; } case 12: { data = new LogicExperienceLevelData(row, this); break; } case 13: { data = new LogicLeagueData(row, this); break; } case 21: { data = new LogicAllianceBadgeData(row, this); break; } case 24: { data = new LogicTauntData(row, this); break; } case 25: { data = new LogicDecoData(row, this); break; } case 26: { data = new LogicVariableData(row, this); break; } case 28: { data = new LogicBoosterData(row, this); break; } case 32: { data = new LogicEnergyPackageData(row, this); break; } case 35: { data = new LogicSpellData(row, this); break; } case 36: { data = new LogicObstacleData(row, this); break; } case 37: { data = new LogicItemsData(row, this); break; } default: { data = new LogicData(row, this); break; } } return(data); }
public virtual void PlayEffect(LogicEffectData data, int offsetX, int offsetY) { // PlayEffect. }
public virtual void PlayTargetedEffect(LogicEffectData data, LogicGameObject gameObject, LogicVector2 target) { // PlayTargetedEffect. }
public virtual void PlayEffect(LogicEffectData data) { // PlayEffect. }
public void TargetReached(int damagePercent) { this.m_damageTime = this.GetProjectileData().GetDamageDelay(); this.UpdateDamage(damagePercent); this.m_targetReached = true; if (!this.m_dummy) { if (this.m_hitEffect != null) { if (this.m_target != null) { LogicHitpointComponent hitpointComponent = this.m_target.GetHitpointComponent(); if (hitpointComponent != null) { if (!this.m_bounceProjectile) { // Listener. } } } else if (!this.m_penetrating && this.m_shockwavePushStrength == 0) { // Listener. } } if (this.m_hitEffect2 != null) { if (this.m_target != null) { LogicHitpointComponent hitpointComponent = this.m_target.GetHitpointComponent(); if (hitpointComponent != null) { if (!this.m_bounceProjectile) { // Listener. } } } else if (!this.m_penetrating && this.m_shockwavePushStrength == 0) { // Listener. } } if (this.m_target != null) { if (this.m_bounceCount > 0) { this.m_bounceTargets[this.m_bounceCount - 1] = this.m_target; this.UpdateBounces(); } } LogicSpellData hitSpell = this.GetProjectileData().GetHitSpell(); if (hitSpell != null) { LogicSpell spell = (LogicSpell)LogicGameObjectFactory.CreateGameObject(hitSpell, this.m_level, this.m_villageType); spell.SetUpgradeLevel(this.GetProjectileData().GetHitSpellLevel()); spell.SetInitialPosition(this.GetMidX(), this.GetMidY()); spell.SetTeam(1); this.GetGameObjectManager().AddGameObject(spell, -1); } if (this.m_bounceProjectile) { int idx = -1; for (int i = 0; i < LogicProjectile.MAX_BOUNCES; i++) { if (this.m_bouncePositions[i] != null) { idx = i; break; } } if (idx != -1) { LogicVector2 bouncePosition = this.m_bouncePositions[idx]; this.m_bouncePositions[idx] = null; this.m_target = null; LogicEffectData bounceEffect = this.GetProjectileData().GetBounceEffect(); if (bounceEffect != null) { this.m_listener.PlayEffect(bounceEffect); } this.m_targetPosition.m_x = 8 * bouncePosition.m_x; this.m_targetPosition.m_y = 8 * bouncePosition.m_y; this.m_randomHitRange = this.m_flyingTarget ? 1000 : 0; // Listener. this.m_targetReached = false; this.m_travelTime = 0; bouncePosition.Destruct(); } else { this.m_target = null; } } if (this.m_targetReached) { LogicEffectData destroyedEffect = this.GetProjectileData().GetDestroyedEffect(); if (destroyedEffect != null) { // Listener. } } } }
public void SetHitEffect(LogicEffectData hitEffect, LogicEffectData hitEffect2) { this.m_hitEffect = hitEffect; this.m_hitEffect2 = hitEffect2; }
public void SetDieEffect(LogicEffectData data1, LogicEffectData data2) { this.m_dieEffect = data1; this.m_dieEffect = data2; }
/// <summary> /// Sets the die effect. /// </summary> public void SetDieEffect(LogicEffectData data) { this._dieEffect = data; }