Пример #1
0
        public override void CreateReferences()
        {
            base.CreateReferences();

            this.m_swf              = this.GetValue("SWF", 0);
            this.m_exportName       = this.GetValue("ExportName", 0);
            this.m_shadowSWF        = this.GetValue("ShadowSWF", 0);
            this.m_shadowExportName = this.GetValue("ShadowExportName", 0);

            this.m_startHeight       = this.GetIntegerValue("StartHeight", 0);
            this.m_startOffset       = this.GetIntegerValue("StartOffset", 0);
            this.m_randomHitPosition = this.GetBooleanValue("RandomHitPosition", 0);

            string particleEmiter = this.GetValue("ParticleEmitter", 0);

            if (particleEmiter.Length > 0)
            {
                this.m_particleEmiterData = LogicDataTables.GetParticleEmitterByName(particleEmiter, this);
            }

            this.m_ballistic   = this.GetBooleanValue("IsBallistic", 0);
            this.m_speed       = (this.GetIntegerValue("Speed", 0) << 9) / 100;
            this.m_playOnce    = this.GetBooleanValue("PlayOnce", 0);
            this.m_useRotate   = this.GetBooleanValue("UseRotate", 0);
            this.m_useTopLayer = this.GetBooleanValue("UseTopLayer", 0);
            this.m_scale       = this.GetIntegerValue("Scale", 0);

            if (this.m_scale == 0)
            {
                this.m_scale = 100;
            }


            this.m_slowdownDefensePercent = this.GetIntegerValue("SlowdownDefencePercent", 0);
            this.m_hitSpellData           = LogicDataTables.GetSpellByName(this.GetValue("HitSpell", 0), this);
            this.m_hitSpellLevel          = this.GetIntegerValue("HitSpellLevel", 0);
            this.m_trackTarget            = this.GetBooleanValue("DontTrackTarget", 0) ^ true;
            this.m_ballisticHeight        = this.GetIntegerValue("BallisticHeight", 0);
            this.m_trajectoryStyle        = this.GetIntegerValue("TrajectoryStyle", 0);
            this.m_fixedTravelTime        = this.GetIntegerValue("FixedTravelTime", 0);
            this.m_damageDelay            = this.GetIntegerValue("DamageDelay", 0);
            this.m_useDirection           = this.GetBooleanValue("UseDirections", 0);
            this.m_scaleTimeline          = this.GetBooleanValue("ScaleTimeline", 0);
            this.m_targetPosRandomRadius  = this.GetIntegerValue("TargetPosRandomRadius", 0);
            this.m_directionFrame         = this.GetBooleanValue("DirectionFrame", 0);
            this.m_effectData             = LogicDataTables.GetEffectByName(this.GetValue("Effect", 0), this);
            this.m_destroyedEffectData    = LogicDataTables.GetEffectByName(this.GetValue("DestroyedEffect", 0), this);
            this.m_bounceEffectData       = LogicDataTables.GetEffectByName(this.GetValue("BounceEffect", 0), this);
        }
Пример #2
0
        public LogicData CreateItem(CSVRow row)
        {
            LogicData data = null;

            switch (this.m_tableIndex)
            {
            case LogicDataType.BUILDING:
            {
                data = new LogicBuildingData(row, this);
                break;
            }

            case LogicDataType.LOCALE:
            {
                data = new LogicLocaleData(row, this);
                break;
            }

            case LogicDataType.RESOURCE:
            {
                data = new LogicResourceData(row, this);
                break;
            }

            case LogicDataType.CHARACTER:
            {
                data = new LogicCharacterData(row, this);
                break;
            }

            case LogicDataType.ANIMATION:
            {
                data = new LogicAnimationData(row, this);
                break;
            }

            case LogicDataType.PROJECTILE:
            {
                data = new LogicProjectileData(row, this);
                break;
            }

            case LogicDataType.BUILDING_CLASS:
            {
                data = new LogicBuildingClassData(row, this);
                break;
            }

            case LogicDataType.OBSTACLE:
            {
                data = new LogicObstacleData(row, this);
                break;
            }

            case LogicDataType.EFFECT:
            {
                data = new LogicEffectData(row, this);
                break;
            }

            case LogicDataType.PARTICLE_EMITTER:
            {
                data = new LogicParticleEmitterData(row, this);
                break;
            }

            case LogicDataType.EXPERIENCE_LEVEL:
            {
                data = new LogicExperienceLevelData(row, this);
                break;
            }

            case LogicDataType.TRAP:
            {
                data = new LogicTrapData(row, this);
                break;
            }

            case LogicDataType.ALLIANCE_BADGE:
            {
                data = new LogicAllianceBadgeData(row, this);
                break;
            }

            case LogicDataType.GLOBAL:
            case LogicDataType.CLIENT_GLOBAL:
            {
                data = new LogicGlobalData(row, this);
                break;
            }

            case LogicDataType.TOWNHALL_LEVEL:
            {
                data = new LogicTownhallLevelData(row, this);
                break;
            }

            case LogicDataType.ALLIANCE_PORTAL:
            {
                data = new LogicAlliancePortalData(row, this);
                break;
            }

            case LogicDataType.NPC:
            {
                data = new LogicNpcData(row, this);
                break;
            }

            case LogicDataType.DECO:
            {
                data = new LogicDecoData(row, this);
                break;
            }

            case LogicDataType.RESOURCE_PACK:
            {
                data = new LogicResourcePackData(row, this);
                break;
            }

            case LogicDataType.SHIELD:
            {
                data = new LogicShieldData(row, this);
                break;
            }

            case LogicDataType.MISSION:
            {
                data = new LogicMissionData(row, this);
                break;
            }

            case LogicDataType.BILLING_PACKAGE:
            {
                data = new LogicBillingPackageData(row, this);
                break;
            }

            case LogicDataType.ACHIEVEMENT:
            {
                data = new LogicAchievementData(row, this);
                break;
            }

            case LogicDataType.SPELL:
            {
                data = new LogicSpellData(row, this);
                break;
            }

            case LogicDataType.HINT:
            {
                data = new LogicHintData(row, this);
                break;
            }

            case LogicDataType.HERO:
            {
                data = new LogicHeroData(row, this);
                break;
            }

            case LogicDataType.LEAGUE:
            {
                data = new LogicLeagueData(row, this);
                break;
            }

            case LogicDataType.NEWS:
            {
                data = new LogicNewsData(row, this);
                break;
            }

            case LogicDataType.WAR:
            {
                data = new LogicWarData(row, this);
                break;
            }

            case LogicDataType.REGION:
            {
                data = new LogicRegionData(row, this);
                break;
            }

            case LogicDataType.ALLIANCE_BADGE_LAYER:
            {
                data = new LogicAllianceBadgeLayerData(row, this);
                break;
            }

            case LogicDataType.ALLIANCE_LEVEL:
            {
                data = new LogicAllianceLevelData(row, this);
                break;
            }

            case LogicDataType.HELPSHIFT:
            {
                data = new LogicHelpshiftData(row, this);
                break;
            }

            case LogicDataType.CREDIT:
            case LogicDataType.FAQ:
            case LogicDataType.VARIABLE:
            {
                data = new LogicData(row, this);
                break;
            }

            case LogicDataType.GEM_BUNDLE:
            {
                data = new LogicGemBundleData(row, this);
                break;
            }

            case LogicDataType.VILLAGE_OBJECT:
            {
                data = new LogicVillageObjectData(row, this);
                break;
            }

            case LogicDataType.CALENDAR_EVENT_FUNCTION:
            {
                data = new LogicCalendarEventFunctionData(row, this);
                break;
            }

            case LogicDataType.BOOMBOX:
            {
                data = new LogicBoomboxData(row, this);
                break;
            }

            case LogicDataType.EVENT_ENTRY:
            {
                data = new LogicEventEntryData(row, this);
                break;
            }

            case LogicDataType.DEEPLINK:
            {
                data = new LogicDeeplinkData(row, this);
                break;
            }

            case LogicDataType.LEAGUE_VILLAGE2:
            {
                data = new LogicLeagueVillage2Data(row, this);
                break;
            }

            default:
            {
                Debugger.Error("Invalid data table id: " + this.m_tableIndex);
                break;
            }
            }

            return(data);
        }