static Libraries() { for (int i = 0; i < CArmours.Length; i++) CArmours[i] = new MLibrary(Settings.CArmourPath + i.ToString("00")); for (int i = 0; i < CHair.Length; i++) CHair[i] = new MLibrary(Settings.CHairPath + i.ToString("00")); for (int i = 0; i < CWeapons.Length; i++) CWeapons[i] = new MLibrary(Settings.CWeaponPath + i.ToString("00")); for (int i = 0; i < AArmours.Length; i++) AArmours[i] = new MLibrary(Settings.AArmourPath + i.ToString("00")); for (int i = 0; i < AHair.Length; i++) AHair[i] = new MLibrary(Settings.AHairPath + i.ToString("00")); for (int i = 0; i < AWeaponsL.Length; i++) AWeaponsL[i] = new MLibrary(Settings.AWeaponPath + i.ToString("00") + " L"); for (int i = 0; i < AWeaponsR.Length; i++) AWeaponsR[i] = new MLibrary(Settings.AWeaponPath + i.ToString("00") + " R"); for (int i = 0; i < Monsters.Length; i++) Monsters[i] = new MLibrary(Settings.MonsterPath + i.ToString("000")); for (int i = 0; i < NPCs.Length; i++) NPCs[i] = new MLibrary(Settings.NPCPath + i.ToString("00")); for (int i = 0; i < CHumEffect.Length; i++) CHumEffect[i] = new MLibrary(Settings.CHumEffectPath + i.ToString("00")); Thread thread = new Thread(LoadLibraries) { IsBackground = true }; thread.Start(); }
public BuffEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, BuffType buffType) : base(library, baseIndex, count, duration, owner, 0) { Repeat = true; Blend = blend; BuffType = buffType; Light = -1; }
public Effect(MLibrary library, int baseIndex, int count, int duration, Point source, long starttime = 0) { Library = library; BaseIndex = baseIndex; Count = count == 0 ? 1 : count; Duration = duration; Start = starttime == 0 ? CMain.Time : starttime; NextFrame = Start + (Duration / Count) * (CurrentFrame + 1); Source = source; }
public DelayedExplosionEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, int Stage, long until) : base(library, baseIndex, count, duration, owner) { Repeat = (Stage == 2) ? false : true; Blend = blend; stage = Stage; effectlist.Add(this); if (stage == 1) SoundManager.PlaySound(20000 + 125 * 10); if (stage == 2) SoundManager.PlaySound(20000 + 125 * 10 + 5); }
public Effect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, long starttime = 0) { Library = library; BaseIndex = baseIndex; Count = count == 0 ? 1 : count; Duration = duration; Start = starttime == 0 ? CMain.Time : starttime; NextFrame = Start + (Duration / Count) * (CurrentFrame + 1); Owner = owner; Source = Owner.CurrentLocation; }
static void InitLibrary(ref MLibrary[] library, string path, string toStringValue, string suffix = "") { var allFiles = Directory.GetFiles(path, "*" + suffix + MLibrary.Extention, SearchOption.TopDirectoryOnly); var lastFile = allFiles.Length > 0 ? Path.GetFileName(allFiles[allFiles.Length - 1]) : "0"; var count = int.Parse(Regex.Match(lastFile, @"\d+").Value) + 1; library = new MLibrary[count]; for (int i = 0; i < count; i++) { library[i] = new MLibrary(path + i.ToString(toStringValue) + suffix); } }
static void InitLibrary(ref MLibrary[] library, string path, string toStringValue, string suffix = "") { if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } var allFiles = Directory.GetFiles(path, "*" + suffix + MLibrary.Extention, SearchOption.TopDirectoryOnly).OrderBy(x => int.Parse(Regex.Match(x, @"\d+").Value)); var lastFile = allFiles.Count() > 0 ? Path.GetFileName(allFiles.Last()) : "0"; var count = int.Parse(Regex.Match(lastFile, @"\d+").Value) + 1; library = new MLibrary[count]; for (int i = 0; i < count; i++) { library[i] = new MLibrary(path + i.ToString(toStringValue) + suffix); } }
public virtual void SetLibraries() { if (Class == MirClass.Assassin) { switch (Armour) { case 12: case 14: BodyLibrary = Armour - 5 < Libraries.AArmours.Length ? Libraries.AArmours[Armour - 5] : Libraries.AArmours[0]; break; case 17: case 18: BodyLibrary = Armour - 7 < Libraries.AArmours.Length ? Libraries.AArmours[Armour - 7] : Libraries.AArmours[0]; break; default: BodyLibrary = Armour < Libraries.AArmours.Length ? Libraries.AArmours[Armour] : Libraries.AArmours[0]; break; } HairLibrary = Hair < Libraries.AHair.Length ? Libraries.AHair[Hair] : null; if (Weapon >= 0) { int index = Weapon == 41 ? 10 : Weapon; WeaponLibrary1 = index < Libraries.AWeaponsL.Length ? Libraries.AWeaponsL[index] : null; WeaponLibrary2 = index < Libraries.AWeaponsR.Length ? Libraries.AWeaponsR[index] : null; } else { WeaponLibrary1 = null; WeaponLibrary2 = null; } /*if (WingEffect > 0) { WingLibrary = WingEffect < Libraries.AHumEffect.Length ? Libraries.AHumEffect[WingEffect] : null; }*/ ArmourOffSet = Gender == MirGender.Male ? 0 : 512; HairOffSet = Gender == MirGender.Male ? 0 : 512; WeaponOffSet = Gender == MirGender.Male ? 0 : 512; WingOffset = Gender == MirGender.Male ? 0 : 840; } else { BodyLibrary = Armour < Libraries.CArmours.Length ? Libraries.CArmours[Armour] : Libraries.CArmours[0]; HairLibrary = Hair < Libraries.CHair.Length ? Libraries.CHair[Hair] : null; if (Weapon >= 0) WeaponLibrary1 = Weapon < Libraries.CWeapons.Length ? Libraries.CWeapons[Weapon] : null; else WeaponLibrary1 = null; WeaponLibrary2 = null; if (WingEffect > 0) { WingLibrary = (WingEffect - 1) < Libraries.CHumEffect.Length ? Libraries.CHumEffect[WingEffect - 1] : null; } ArmourOffSet = Gender == MirGender.Male ? 0 : 808; HairOffSet = Gender == MirGender.Male ? 0 : 808; WeaponOffSet = Gender == MirGender.Male ? 0 : 416; WingOffset = Gender == MirGender.Male ? 0 : 840; } DieSound = Gender == MirGender.Male ? SoundList.MaleDie : SoundList.FemaleDie; FlinchSound = Gender == MirGender.Male ? SoundList.MaleFlinch : SoundList.FemaleFlinch; }
public SpecialEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, bool drawBehind, uint type) : base(library, baseIndex, count, duration, owner, 0, drawBehind) { Blend = blend; DrawBehind = drawBehind; EffectType = type; Light = -1; }
static Libraries() { //Wiz/War/Tao for (int i = 0; i < CArmours.Length; i++) { CArmours[i] = new MLibrary(Settings.CArmourPath + i.ToString("00")); } for (int i = 0; i < CHair.Length; i++) { CHair[i] = new MLibrary(Settings.CHairPath + i.ToString("00")); } for (int i = 0; i < CWeapons.Length; i++) { CWeapons[i] = new MLibrary(Settings.CWeaponPath + i.ToString("00")); } for (int i = 0; i < CWeaponEffect.Length; i++) { CWeaponEffect[i] = new MLibrary(Settings.CWeaponEffectPath + i.ToString("00")); } for (int i = 0; i < CHumEffect.Length; i++) { CHumEffect[i] = new MLibrary(Settings.CHumEffectPath + i.ToString("00")); } //Assassin for (int i = 0; i < AArmours.Length; i++) { AArmours[i] = new MLibrary(Settings.AArmourPath + i.ToString("00")); } for (int i = 0; i < AHair.Length; i++) { AHair[i] = new MLibrary(Settings.AHairPath + i.ToString("00")); } for (int i = 0; i < AWeaponsL.Length; i++) { AWeaponsL[i] = new MLibrary(Settings.AWeaponPath + i.ToString("00") + " L"); } for (int i = 0; i < AWeaponsR.Length; i++) { AWeaponsR[i] = new MLibrary(Settings.AWeaponPath + i.ToString("00") + " R"); } for (int i = 0; i < AHumEffect.Length; i++) { AHumEffect[i] = new MLibrary(Settings.AHumEffectPath + i.ToString("00")); } //Archer for (int i = 0; i < ARArmours.Length; i++) { ARArmours[i] = new MLibrary(Settings.ARArmourPath + i.ToString("00")); } for (int i = 0; i < ARHair.Length; i++) { ARHair[i] = new MLibrary(Settings.ARHairPath + i.ToString("00")); } for (int i = 0; i < ARWeapons.Length; i++) { ARWeapons[i] = new MLibrary(Settings.ARWeaponPath + i.ToString("00")); } for (int i = 0; i < ARWeaponsS.Length; i++) { ARWeaponsS[i] = new MLibrary(Settings.ARWeaponPath + i.ToString("00") + " S"); } for (int i = 0; i < ARHumEffect.Length; i++) { ARHumEffect[i] = new MLibrary(Settings.ARHumEffectPath + i.ToString("00")); } //HumUp started //stupple for (int i = 0; i < UpCArmours.Length; i++) { UpCArmours[i] = new MLibrary(Settings.UpCArmourPath + i.ToString("00")); } for (int i = 0; i < UpCWeapons.Length; i++) { UpCWeapons[i] = new MLibrary(Settings.UpCWeaponPath + i.ToString("00")); } for (int i = 0; i < UpCHair.Length; i++) { UpCHair[i] = new MLibrary(Settings.UpCHairPath + i.ToString("00")); } for (int i = 0; i < UpCHumEffect.Length; i++) { UpCHumEffect[i] = new MLibrary(Settings.UpCHumEffectPath + i.ToString("00")); } for (int i = 0; i < UpWarArmours.Length; i++) { UpWarArmours[i] = new MLibrary(Settings.UpWarArmourPath + i.ToString("00")); } for (int i = 0; i < UpWarWeapons.Length; i++) { UpWarWeapons[i] = new MLibrary(Settings.UpWarWeaponPath + i.ToString("00")); } for (int i = 0; i < UpWarHair.Length; i++) { UpWarHair[i] = new MLibrary(Settings.UpWarHairPath + i.ToString("00")); } for (int i = 0; i < UpWarHumEffect.Length; i++) { UpWarHumEffect[i] = new MLibrary(Settings.UpWarHumEffectPath + i.ToString("00")); } for (int i = 0; i < UpWizArmours.Length; i++) { UpWizArmours[i] = new MLibrary(Settings.UpWizArmourPath + i.ToString("00")); } for (int i = 0; i < UpWizWeapons.Length; i++) { UpWizWeapons[i] = new MLibrary(Settings.UpWizWeaponPath + i.ToString("00")); } for (int i = 0; i < UpWizHair.Length; i++) { UpWizHair[i] = new MLibrary(Settings.UpWizHairPath + i.ToString("00")); } for (int i = 0; i < UpWizHumEffect.Length; i++) { UpWizHumEffect[i] = new MLibrary(Settings.UpWizHumEffectPath + i.ToString("00")); } for (int i = 0; i < UpTaoArmours.Length; i++) { UpTaoArmours[i] = new MLibrary(Settings.UpTaoArmourPath + i.ToString("00")); } for (int i = 0; i < UpTaoWeapons.Length; i++) { UpTaoWeapons[i] = new MLibrary(Settings.UpTaoWeaponPath + i.ToString("00")); } for (int i = 0; i < UpTaoHair.Length; i++) { UpTaoHair[i] = new MLibrary(Settings.UpTaoHairPath + i.ToString("00")); } for (int i = 0; i < UpTaoHumEffect.Length; i++) { UpTaoHumEffect[i] = new MLibrary(Settings.UpTaoHumEffectPath + i.ToString("00")); } for (int i = 0; i < UpAssArmours.Length; i++) { UpAssArmours[i] = new MLibrary(Settings.UpAssArmourPath + i.ToString("00")); } for (int i = 0; i < UpAssWeaponsR.Length; i++) { UpAssWeaponsR[i] = new MLibrary(Settings.UpAssWeaponRPath + i.ToString("00")); } for (int i = 0; i < UpAssWeaponsL.Length; i++) { UpAssWeaponsL[i] = new MLibrary(Settings.UpAssWeaponLPath + i.ToString("00")); } for (int i = 0; i < UpAssHair.Length; i++) { UpAssHair[i] = new MLibrary(Settings.UpAssHairPath + i.ToString("00")); } for (int i = 0; i < UpAssHumEffect.Length; i++) { UpAssHumEffect[i] = new MLibrary(Settings.UpAssHumEffectPath + i.ToString("00")); } for (int i = 0; i < UpArcArmours.Length; i++) { UpArcArmours[i] = new MLibrary(Settings.UpArcArmourPath + i.ToString("00")); } for (int i = 0; i < UpArcWeapons.Length; i++) { UpArcWeapons[i] = new MLibrary(Settings.UpArcWeaponPath + i.ToString("00")); } for (int i = 0; i < UpArcWeaponsS.Length; i++) { UpArcWeaponsS[i] = new MLibrary(Settings.UpArcWeaponSPath + i.ToString("00")); } for (int i = 0; i < UpArcHair.Length; i++) { UpArcHair[i] = new MLibrary(Settings.UpArcHairPath + i.ToString("00")); } for (int i = 0; i < UpArcHumEffect.Length; i++) { UpArcHumEffect[i] = new MLibrary(Settings.UpArcHumEffectPath + i.ToString("00")); } for (int i = 0; i < UpMounts.Length; i++) { UpMounts[i] = new MLibrary(Settings.UpMountPath + i.ToString("00")); } for (int i = 0; i < UpFishingM.Length; i++) { UpFishingM[i] = new MLibrary(Settings.UpFishingPath + i.ToString("00M")); } for (int i = 0; i < UpFishingF.Length; i++) { UpFishingF[i] = new MLibrary(Settings.UpFishingPath + i.ToString("00F")); } ///Hum End //stupple //Other for (int i = 0; i < Monsters.Length; i++) { Monsters[i] = new MLibrary(Settings.MonsterPath + i.ToString("000")); } for (int i = 0; i < Gates.Length; i++) { Gates[i] = new MLibrary(Settings.GatePath + i.ToString("00")); } for (int i = 0; i < Flags.Length; i++) { Flags[i] = new MLibrary(Settings.FlagPath + i.ToString("00")); } for (int i = 0; i < NPCs.Length; i++) { NPCs[i] = new MLibrary(Settings.NPCPath + i.ToString("00")); } for (int i = 0; i < Mounts.Length; i++) { Mounts[i] = new MLibrary(Settings.MountPath + i.ToString("00")); } for (int i = 0; i < Fishing.Length; i++) { Fishing[i] = new MLibrary(Settings.FishingPath + i.ToString("00")); } for (int i = 0; i < Pets.Length; i++) { Pets[i] = new MLibrary(Settings.PetsPath + i.ToString("00")); } for (int i = 0; i < Transform.Length; i++) { Transform[i] = new MLibrary(Settings.TransformPath + i.ToString("00")); } for (int i = 0; i < TransformMounts.Length; i++) { TransformMounts[i] = new MLibrary(Settings.TransformMountsPath + i.ToString("00")); } for (int i = 0; i < TransformEffect.Length; i++) { TransformEffect[i] = new MLibrary(Settings.TransformEffectPath + i.ToString("00")); } for (int i = 0; i < TransformWeaponEffect.Length; i++) { TransformWeaponEffect[i] = new MLibrary(Settings.TransformWeaponEffectPath + i.ToString("00")); } #region Maplibs //wemade mir2 (allowed from 0-99) MapLibs[0] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Tiles"); MapLibs[1] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Smtiles"); MapLibs[2] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Objects"); for (int i = 2; i < 24; i++) { MapLibs[i + 1] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Objects" + i.ToString()); } //shanda mir2 (allowed from 100-199) MapLibs[100] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Tiles"); for (int i = 1; i < 10; i++) { MapLibs[100 + i] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Tiles" + (i + 1)); } MapLibs[110] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\SmTiles"); for (int i = 1; i < 10; i++) { MapLibs[110 + i] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\SmTiles" + (i + 1)); } MapLibs[120] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Objects"); for (int i = 1; i < 31; i++) { MapLibs[120 + i] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Objects" + (i + 1)); } MapLibs[190] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\AniTiles1"); //wemade mir3 (allowed from 200-299) string[] Mapstate = { "", "wood\\", "sand\\", "snow\\", "forest\\" }; for (int i = 0; i < Mapstate.Length; i++) { MapLibs[200 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Tilesc"); MapLibs[201 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Tiles30c"); MapLibs[202 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Tiles5c"); MapLibs[203 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Smtilesc"); MapLibs[204 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Housesc"); MapLibs[205 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Cliffsc"); MapLibs[206 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Dungeonsc"); MapLibs[207 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Innersc"); MapLibs[208 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Furnituresc"); MapLibs[209 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Wallsc"); MapLibs[210 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "smObjectsc"); MapLibs[211 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Animationsc"); MapLibs[212 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Object1c"); MapLibs[213 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Object2c"); } Mapstate = new string[] { "", "wood", "sand", "snow", "forest" }; //shanda mir3 (allowed from 300-399) for (int i = 0; i < Mapstate.Length; i++) { MapLibs[300 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Tilesc" + Mapstate[i]); MapLibs[301 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Tiles30c" + Mapstate[i]); MapLibs[302 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Tiles5c" + Mapstate[i]); MapLibs[303 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Smtilesc" + Mapstate[i]); MapLibs[304 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Housesc" + Mapstate[i]); MapLibs[305 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Cliffsc" + Mapstate[i]); MapLibs[306 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Dungeonsc" + Mapstate[i]); MapLibs[307 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Innersc" + Mapstate[i]); MapLibs[308 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Furnituresc" + Mapstate[i]); MapLibs[309 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Wallsc" + Mapstate[i]); MapLibs[310 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "smObjectsc" + Mapstate[i]); MapLibs[311 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Animationsc" + Mapstate[i]); MapLibs[312 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Object1c" + Mapstate[i]); MapLibs[313 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Object2c" + Mapstate[i]); } #endregion LoadLibraries(); Thread thread = new Thread(LoadGameLibraries) { IsBackground = true }; thread.Start(); }
private static void LoadGameLibraries() { Count = MapLibs.Length + Monsters.Length + Gates.Length + NPCs.Length + CArmours.Length + CHair.Length + CWeapons.Length + AArmours.Length + AHair.Length + AWeaponsL.Length + AWeaponsR.Length + ARArmours.Length + ARHair.Length + ARWeapons.Length + ARWeaponsS.Length + CHumEffect.Length + AHumEffect.Length + ARHumEffect.Length + Mounts.Length + Fishing.Length + Pets.Length + Transform.Length + TransformMounts.Length + TransformEffect.Length + TransformWeaponEffect.Length + 17; Dragon.Initialize(); Progress++; BuffIcon.Initialize(); Progress++; Help.Initialize(); Progress++; MiniMap.Initialize(); Progress++; MagIcon.Initialize(); Progress++; MagIcon2.Initialize(); Progress++; Magic.Initialize(); Progress++; Magic2.Initialize(); Progress++; Magic3.Initialize(); Progress++; MagicC.Initialize(); Progress++; Effect.Initialize(); Progress++; GuildSkill.Initialize(); Progress++; Background.Initialize(); Progress++; Deco.Initialize(); Progress++; Items.Initialize(); Progress++; StateItems.Initialize(); Progress++; FloorItems.Initialize(); Progress++; for (int i = 0; i < MapLibs.Length; i++) { if (MapLibs[i] == null) MapLibs[i] = new MLibrary(""); else MapLibs[i].Initialize(); Progress++; } for (int i = 0; i < Monsters.Length; i++) { Monsters[i].Initialize(); Progress++; } for (int i = 0; i < Gates.Length; i++) { Gates[i].Initialize(); Progress++; } for (int i = 0; i < NPCs.Length; i++) { NPCs[i].Initialize(); Progress++; } for (int i = 0; i < CArmours.Length; i++) { CArmours[i].Initialize(); Progress++; } for (int i = 0; i < CHair.Length; i++) { CHair[i].Initialize(); Progress++; } for (int i = 0; i < CWeapons.Length; i++) { CWeapons[i].Initialize(); Progress++; } for (int i = 0; i < AArmours.Length; i++) { AArmours[i].Initialize(); Progress++; } for (int i = 0; i < AHair.Length; i++) { AHair[i].Initialize(); Progress++; } for (int i = 0; i < AWeaponsL.Length; i++) { AWeaponsL[i].Initialize(); Progress++; } for (int i = 0; i < AWeaponsR.Length; i++) { AWeaponsR[i].Initialize(); Progress++; } for (int i = 0; i < ARArmours.Length; i++) { ARArmours[i].Initialize(); Progress++; } for (int i = 0; i < ARHair.Length; i++) { ARHair[i].Initialize(); Progress++; } for (int i = 0; i < ARWeapons.Length; i++) { ARWeapons[i].Initialize(); Progress++; } for (int i = 0; i < ARWeaponsS.Length; i++) { ARWeaponsS[i].Initialize(); Progress++; } for (int i = 0; i < CHumEffect.Length; i++) { CHumEffect[i].Initialize(); Progress++; } for (int i = 0; i < AHumEffect.Length; i++) { AHumEffect[i].Initialize(); Progress++; } for (int i = 0; i < ARHumEffect.Length; i++) { ARHumEffect[i].Initialize(); Progress++; } for (int i = 0; i < Mounts.Length; i++) { Mounts[i].Initialize(); Progress++; } for (int i = 0; i < Fishing.Length; i++) { Fishing[i].Initialize(); Progress++; } for (int i = 0; i < Pets.Length; i++) { Pets[i].Initialize(); Progress++; } for (int i = 0; i < Transform.Length; i++) { Transform[i].Initialize(); Progress++; } for (int i = 0; i < TransformEffect.Length; i++) { TransformEffect[i].Initialize(); Progress++; } for (int i = 0; i < TransformWeaponEffect.Length; i++) { TransformWeaponEffect[i].Initialize(); Progress++; } for (int i = 0; i < TransformMounts.Length; i++) { TransformMounts[i].Initialize(); Progress++; } Loaded = true; }
static void LoadLibraries() { Count = MapLibs.Length + Monsters.Length + NPCs.Length + CArmours.Length + CHair.Length + CWeapons.Length + AArmours.Length + AHair.Length + AWeaponsL.Length + AWeaponsR.Length + ARArmours.Length + ARHair.Length + ARWeapons.Length + ARWeaponsS.Length + CHumEffect.Length + AHumEffect.Length + ARHumEffect.Length + Mounts.Length + Fishing.Length + Pets.Length + 20; Dragon.Initialize(); Progress++; ChrSel.Initialize(); Progress++; Prguse.Initialize(); Progress++; Prguse2.Initialize(); Progress++; BuffIcon.Initialize(); Progress++; Help.Initialize(); Progress++; MiniMap.Initialize(); Progress++; MagIcon.Initialize(); Progress++; MagIcon2.Initialize(); Progress++; Magic.Initialize(); Progress++; Magic2.Initialize(); Progress++; Magic3.Initialize(); Progress++; MagicC.Initialize(); Progress++; Effect.Initialize(); Progress++; CustomEffects.Initialize(); Progress++; Items.Initialize(); Progress++; StateItems.Initialize(); Progress++; FloorItems.Initialize(); Progress++; for (int i = 0; i < MapLibs.Length; i++) { if (MapLibs[i] == null) { MapLibs[i] = new MLibrary(""); } else { MapLibs[i].Initialize(); } Progress++; } for (int i = 0; i < Monsters.Length; i++) { Monsters[i].Initialize(); Progress++; } for (int i = 0; i < NPCs.Length; i++) { NPCs[i].Initialize(); Progress++; } for (int i = 0; i < CArmours.Length; i++) { CArmours[i].Initialize(); Progress++; } for (int i = 0; i < CHair.Length; i++) { CHair[i].Initialize(); Progress++; } for (int i = 0; i < CWeapons.Length; i++) { CWeapons[i].Initialize(); Progress++; } for (int i = 0; i < AArmours.Length; i++) { AArmours[i].Initialize(); Progress++; } for (int i = 0; i < AHair.Length; i++) { AHair[i].Initialize(); Progress++; } for (int i = 0; i < AWeaponsL.Length; i++) { AWeaponsL[i].Initialize(); Progress++; } for (int i = 0; i < AWeaponsR.Length; i++) { AWeaponsR[i].Initialize(); Progress++; } for (int i = 0; i < ARArmours.Length; i++) { ARArmours[i].Initialize(); Progress++; } for (int i = 0; i < ARHair.Length; i++) { ARHair[i].Initialize(); Progress++; } for (int i = 0; i < ARWeapons.Length; i++) { ARWeapons[i].Initialize(); Progress++; } for (int i = 0; i < ARWeaponsS.Length; i++) { ARWeaponsS[i].Initialize(); Progress++; } for (int i = 0; i < CHumEffect.Length; i++) { CHumEffect[i].Initialize(); Progress++; } for (int i = 0; i < AHumEffect.Length; i++) { AHumEffect[i].Initialize(); Progress++; } for (int i = 0; i < ARHumEffect.Length; i++) { ARHumEffect[i].Initialize(); Progress++; } for (int i = 0; i < Mounts.Length; i++) { Mounts[i].Initialize(); Progress++; } for (int i = 0; i < Fishing.Length; i++) { Fishing[i].Initialize(); Progress++; } for (int i = 0; i < Pets.Length; i++) { Pets[i].Initialize(); Progress++; } Loaded = true; }
public virtual void SetLibraries() { bool AltAnim = false; switch(Class) { #region Archer case MirClass.Archer: #region WeaponType if (HasClassWeapon) { switch (CurrentAction) { case MirAction.Walking: case MirAction.Running: case MirAction.AttackRange1: case MirAction.AttackRange2: AltAnim = true; break; } } if (CurrentAction == MirAction.Jump) AltAnim = true; #endregion #region Armours if (AltAnim) { switch (Armour) { case 9: //heaven case 10: //mir case 11: //oma case 12: //spirit BodyLibrary = Armour + 1 < Libraries.ARArmours.Length ? Libraries.ARArmours[Armour + 1] : Libraries.ARArmours[0]; break; case 19: BodyLibrary = Armour - 5 < Libraries.ARArmours.Length ? Libraries.ARArmours[Armour - 5] : Libraries.ARArmours[0]; break; case 29: case 30: BodyLibrary = Armour - 14 < Libraries.ARArmours.Length ? Libraries.ARArmours[Armour - 14] : Libraries.ARArmours[0]; break; case 35: case 36: case 37: case 38: case 39: case 40: case 41: BodyLibrary = Armour - 32 < Libraries.ARArmours.Length ? Libraries.ARArmours[Armour - 32] : Libraries.ARArmours[0]; break; default: BodyLibrary = Armour < Libraries.ARArmours.Length ? Libraries.ARArmours[Armour] : Libraries.ARArmours[0]; break; } HairLibrary = Hair < Libraries.ARHair.Length ? Libraries.ARHair[Hair] : null; } else { BodyLibrary = Armour < Libraries.CArmours.Length ? Libraries.CArmours[Armour] : Libraries.CArmours[0]; HairLibrary = Hair < Libraries.CHair.Length ? Libraries.CHair[Hair] : null; } #endregion #region Weapons if (HasClassWeapon) { int Index = Weapon - 200; if (AltAnim) WeaponLibrary2 = Index < Libraries.ARWeaponsS.Length ? Libraries.ARWeaponsS[Index] : null; else WeaponLibrary2 = Index < Libraries.ARWeapons.Length ? Libraries.ARWeapons[Index] : null; WeaponLibrary1 = null; } else { if (Weapon >= 0) WeaponLibrary1 = Weapon < Libraries.CWeapons.Length ? Libraries.CWeapons[Weapon] : null; else WeaponLibrary1 = null; WeaponLibrary2 = null; } #endregion #region WingEffects if (WingEffect > 0 && WingEffect < 100) { if (AltAnim) WingLibrary = (WingEffect - 1) < Libraries.ARHumEffect.Length ? Libraries.ARHumEffect[WingEffect - 1] : null; else WingLibrary = (WingEffect - 1) < Libraries.CHumEffect.Length ? Libraries.CHumEffect[WingEffect - 1] : null; } #endregion #region Offsets ArmourOffSet = Gender == MirGender.Male ? 0 : AltAnim ? 352 : 808; HairOffSet = Gender == MirGender.Male ? 0 : AltAnim ? 352 : 808; WeaponOffSet = Gender == MirGender.Male ? 0 : AltAnim ? 352 : 416; WingOffset = Gender == MirGender.Male ? 0 : AltAnim ? 352 : 840; MountOffset = 0; #endregion break; #endregion #region Assassin case MirClass.Assassin: #region WeaponType if (HasClassWeapon || Weapon < 0) { switch (CurrentAction) { case MirAction.Standing: case MirAction.Stance: case MirAction.Walking: case MirAction.Running: case MirAction.Die: case MirAction.Struck: case MirAction.Attack1: case MirAction.Attack2: case MirAction.Attack3: case MirAction.Attack4: case MirAction.Sneek: case MirAction.Spell: case MirAction.DashAttack: AltAnim = true; break; } } #endregion #region Armours if (AltAnim) { switch (Armour) { case 9: //heaven case 10: //mir case 11: //oma case 12: //spirit BodyLibrary = Armour + 3 < Libraries.AArmours.Length ? Libraries.AArmours[Armour + 3] : Libraries.AArmours[0]; break; case 19: BodyLibrary = Armour - 3 < Libraries.AArmours.Length ? Libraries.AArmours[Armour - 3] : Libraries.AArmours[0]; break; case 20: case 21: case 22: case 23: //red bone case 24: BodyLibrary = Armour - 17 < Libraries.AArmours.Length ? Libraries.AArmours[Armour - 17] : Libraries.AArmours[0]; break; case 28: case 29: case 30: BodyLibrary = Armour - 20 < Libraries.AArmours.Length ? Libraries.AArmours[Armour - 20] : Libraries.AArmours[0]; break; case 34: BodyLibrary = Armour - 23 < Libraries.AArmours.Length ? Libraries.AArmours[Armour - 23] : Libraries.AArmours[0]; break; default: BodyLibrary = Armour < Libraries.AArmours.Length ? Libraries.AArmours[Armour] : Libraries.AArmours[0]; break; } HairLibrary = Hair < Libraries.AHair.Length ? Libraries.AHair[Hair] : null; } else { BodyLibrary = Armour < Libraries.CArmours.Length ? Libraries.CArmours[Armour] : Libraries.CArmours[0]; HairLibrary = Hair < Libraries.CHair.Length ? Libraries.CHair[Hair] : null; } #endregion #region Weapons if (HasClassWeapon) { int Index = Weapon - 100; WeaponLibrary1 = Index < Libraries.AWeaponsL.Length ? Libraries.AWeaponsR[Index] : null; WeaponLibrary2 = Index < Libraries.AWeaponsR.Length ? Libraries.AWeaponsL[Index] : null; } else { if (Weapon >= 0) WeaponLibrary1 = Weapon < Libraries.CWeapons.Length ? Libraries.CWeapons[Weapon] : null; else WeaponLibrary1 = null; WeaponLibrary2 = null; } #endregion #region WingEffects if (WingEffect > 0 && WingEffect < 100) { if(AltAnim) WingLibrary = (WingEffect - 1) < Libraries.AHumEffect.Length ? Libraries.AHumEffect[WingEffect - 1] : null; else WingLibrary = (WingEffect - 1) < Libraries.CHumEffect.Length ? Libraries.CHumEffect[WingEffect - 1] : null; } #endregion #region Offsets ArmourOffSet = Gender == MirGender.Male ? 0 : AltAnim ? 512 : 808; HairOffSet = Gender == MirGender.Male ? 0 : AltAnim ? 512 : 808; WeaponOffSet = Gender == MirGender.Male ? 0 : AltAnim ? 512 : 416; WingOffset = Gender == MirGender.Male ? 0 : AltAnim ? 544 : 840; MountOffset = 0; #endregion break; #endregion #region Others case MirClass.Warrior: case MirClass.Taoist: case MirClass.Wizard: #region Armours BodyLibrary = Armour < Libraries.CArmours.Length ? Libraries.CArmours[Armour] : Libraries.CArmours[0]; HairLibrary = Hair < Libraries.CHair.Length ? Libraries.CHair[Hair] : null; #endregion #region Weapons if (Weapon >= 0) WeaponLibrary1 = Weapon < Libraries.CWeapons.Length ? Libraries.CWeapons[Weapon] : null; else WeaponLibrary1 = null; WeaponLibrary2 = null; #endregion #region WingEffects if (WingEffect > 0 && WingEffect < 100) { WingLibrary = (WingEffect - 1) < Libraries.CHumEffect.Length ? Libraries.CHumEffect[WingEffect - 1] : null; } #endregion #region Offsets ArmourOffSet = Gender == MirGender.Male ? 0 : 808; HairOffSet = Gender == MirGender.Male ? 0 : 808; WeaponOffSet = Gender == MirGender.Male ? 0 : 416; WingOffset = Gender == MirGender.Male ? 0 : 840; MountOffset = 0; #endregion break; #endregion } #region Common //Harvest if (CurrentAction == MirAction.Harvest) WeaponLibrary1 = 1 < Libraries.CWeapons.Length ? Libraries.CWeapons[1] : null; //Mounts if (MountType > -1 && RidingMount) { MountLibrary = MountType < Libraries.Mounts.Length ? Libraries.Mounts[MountType] : null; } else { MountLibrary = null; } //Fishing if (HasFishingRod) { if (CurrentAction == MirAction.FishingCast || CurrentAction == MirAction.FishingWait || CurrentAction == MirAction.FishingReel) { WeaponLibrary1 = 0 < Libraries.Fishing.Length ? Libraries.Fishing[Weapon - 49] : null; WeaponLibrary2 = null; WeaponOffSet = -632; } } DieSound = Gender == MirGender.Male ? SoundList.MaleDie : SoundList.FemaleDie; FlinchSound = Gender == MirGender.Male ? SoundList.MaleFlinch : SoundList.FemaleFlinch; #endregion }
static void LoadLibraries() { Count = MapLibs.Length + Monsters.Length + NPCs.Length + CArmours.Length + CHair.Length + CWeapons.Length + AArmours.Length + AHair.Length + AWeaponsL.Length + AWeaponsR.Length + CHumEffect.Length + 15; Dragon.Initialize(); Progress++; Prguse2.Initialize(); Progress++; MiniMap.Initialize(); Progress++; MagIcon.Initialize(); Progress++; MagIcon2.Initialize(); Progress++; Magic.Initialize(); Progress++; Magic2.Initialize(); Progress++; Magic3.Initialize(); Progress++; Effect.Initialize(); Progress++; CustomEffects.Initialize(); Progress++; Items.Initialize(); Progress++; StateItems.Initialize(); Progress++; FloorItems.Initialize(); Progress++; for (int i = 0; i < MapLibs.Length; i++) { if (MapLibs[i] == null) MapLibs[i] = new MLibrary(""); else MapLibs[i].Initialize(); Progress++; } for (int i = 0; i < Monsters.Length; i++) { Monsters[i].Initialize(); Progress++; } for (int i = 0; i < NPCs.Length; i++) { NPCs[i].Initialize(); Progress++; } for (int i = 0; i < CArmours.Length; i++) { CArmours[i].Initialize(); Progress++; } for (int i = 0; i < CHair.Length; i++) { CHair[i].Initialize(); Progress++; } for (int i = 0; i < CWeapons.Length; i++) { CWeapons[i].Initialize(); Progress++; } for (int i = 0; i < AArmours.Length; i++) { AArmours[i].Initialize(); Progress++; } for (int i = 0; i < AHair.Length; i++) { AHair[i].Initialize(); Progress++; } for (int i = 0; i < AWeaponsL.Length; i++) { AWeaponsL[i].Initialize(); Progress++; } for (int i = 0; i < AWeaponsR.Length; i++) { AWeaponsR[i].Initialize(); Progress++; } for (int i = 0; i < CHumEffect.Length; i++) { CHumEffect[i].Initialize(); Progress++; } Loaded = true; }
public virtual void SetLibraries() { //fishing broken //10 //11 //12 //13 //almost all broken //20 - black footballer - 791 //21 - red footballer - 791 //22 - blue footballer - 791 //23 - green footballer - 791 //24 - red2 footballer - 791 bool altAnim = false; bool showMount = true; bool showFishing = true; if (TransformType > -1) { #region Transform switch (TransformType) { case 4: case 5: case 7: case 8: case 26: showFishing = false; break; case 6: case 9: showMount = false; showFishing = false; break; default: break; } if (MountType > 6 && RidingMount && TransformType != 26) { ArmourOffSet = -416; BodyLibrary = TransformType < Libraries.TransformMounts.Length ? Libraries.TransformMounts[TransformType] : Libraries.TransformMounts[0]; } else { ArmourOffSet = 0; BodyLibrary = TransformType < Libraries.Transform.Length ? Libraries.Transform[TransformType] : Libraries.Transform[0]; } HairLibrary = null; WeaponLibrary1 = null; WeaponLibrary2 = null; if (TransformType == 19) { WingEffect = 2; WingLibrary = WingEffect - 1 < Libraries.TransformEffect.Length ? Libraries.TransformEffect[WingEffect - 1] : null; } else { WingLibrary = null; } #endregion } else { switch (Class) { #region Archer case MirClass.Archer: #region WeaponType if (HasClassWeapon) { switch (CurrentAction) { case MirAction.Walking: case MirAction.Running: case MirAction.AttackRange1: case MirAction.AttackRange2: altAnim = true; break; } } if (CurrentAction == MirAction.Jump) altAnim = true; #endregion #region Armours if (altAnim) { switch (Armour) { case 9: //heaven case 10: //mir case 11: //oma case 12: //spirit BodyLibrary = Armour + 1 < Libraries.ARArmours.Length ? Libraries.ARArmours[Armour + 1] : Libraries.ARArmours[0]; break; case 19: BodyLibrary = Armour - 5 < Libraries.ARArmours.Length ? Libraries.ARArmours[Armour - 5] : Libraries.ARArmours[0]; break; case 29: case 30: BodyLibrary = Armour - 14 < Libraries.ARArmours.Length ? Libraries.ARArmours[Armour - 14] : Libraries.ARArmours[0]; break; case 35: case 36: case 37: case 38: case 39: case 40: case 41: BodyLibrary = Armour - 32 < Libraries.ARArmours.Length ? Libraries.ARArmours[Armour - 32] : Libraries.ARArmours[0]; break; default: BodyLibrary = Armour < Libraries.ARArmours.Length ? Libraries.ARArmours[Armour] : Libraries.ARArmours[0]; break; } HairLibrary = Hair < Libraries.ARHair.Length ? Libraries.ARHair[Hair] : null; } else { BodyLibrary = Armour < Libraries.CArmours.Length ? Libraries.CArmours[Armour] : Libraries.CArmours[0]; HairLibrary = Hair < Libraries.CHair.Length ? Libraries.CHair[Hair] : null; } #endregion #region Weapons if (HasClassWeapon) { int Index = Weapon - 200; if (altAnim) WeaponLibrary2 = Index < Libraries.ARWeaponsS.Length ? Libraries.ARWeaponsS[Index] : null; else WeaponLibrary2 = Index < Libraries.ARWeapons.Length ? Libraries.ARWeapons[Index] : null; WeaponLibrary1 = null; } else { if (Weapon >= 0) WeaponLibrary1 = Weapon < Libraries.CWeapons.Length ? Libraries.CWeapons[Weapon] : null; else WeaponLibrary1 = null; WeaponLibrary2 = null; } #endregion #region WingEffects if (WingEffect > 0 && WingEffect < 100) { if (altAnim) WingLibrary = (WingEffect - 1) < Libraries.ARHumEffect.Length ? Libraries.ARHumEffect[WingEffect - 1] : null; else WingLibrary = (WingEffect - 1) < Libraries.CHumEffect.Length ? Libraries.CHumEffect[WingEffect - 1] : null; } #endregion #region Offsets ArmourOffSet = Gender == MirGender.Male ? 0 : altAnim ? 352 : 808; HairOffSet = Gender == MirGender.Male ? 0 : altAnim ? 352 : 808; WeaponOffSet = Gender == MirGender.Male ? 0 : altAnim ? 352 : 416; WingOffset = Gender == MirGender.Male ? 0 : altAnim ? 352 : 840; MountOffset = 0; #endregion break; #endregion #region Assassin case MirClass.Assassin: #region WeaponType if (HasClassWeapon || Weapon < 0) { switch (CurrentAction) { case MirAction.Standing: case MirAction.Stance: case MirAction.Walking: case MirAction.Running: case MirAction.Die: case MirAction.Struck: case MirAction.Attack1: case MirAction.Attack2: case MirAction.Attack3: case MirAction.Attack4: case MirAction.Sneek: case MirAction.Spell: case MirAction.DashAttack: altAnim = true; break; } } #endregion #region Armours if (altAnim) { switch (Armour) { case 9: //heaven case 10: //mir case 11: //oma case 12: //spirit BodyLibrary = Armour + 3 < Libraries.AArmours.Length ? Libraries.AArmours[Armour + 3] : Libraries.AArmours[0]; break; case 19: BodyLibrary = Armour - 3 < Libraries.AArmours.Length ? Libraries.AArmours[Armour - 3] : Libraries.AArmours[0]; break; case 20: case 21: case 22: case 23: //red bone case 24: BodyLibrary = Armour - 17 < Libraries.AArmours.Length ? Libraries.AArmours[Armour - 17] : Libraries.AArmours[0]; break; case 28: case 29: case 30: BodyLibrary = Armour - 20 < Libraries.AArmours.Length ? Libraries.AArmours[Armour - 20] : Libraries.AArmours[0]; break; case 34: BodyLibrary = Armour - 23 < Libraries.AArmours.Length ? Libraries.AArmours[Armour - 23] : Libraries.AArmours[0]; break; default: BodyLibrary = Armour < Libraries.AArmours.Length ? Libraries.AArmours[Armour] : Libraries.AArmours[0]; break; } HairLibrary = Hair < Libraries.AHair.Length ? Libraries.AHair[Hair] : null; } else { BodyLibrary = Armour < Libraries.CArmours.Length ? Libraries.CArmours[Armour] : Libraries.CArmours[0]; HairLibrary = Hair < Libraries.CHair.Length ? Libraries.CHair[Hair] : null; } #endregion #region Weapons if (HasClassWeapon) { int Index = Weapon - 100; WeaponLibrary1 = Index < Libraries.AWeaponsL.Length ? Libraries.AWeaponsR[Index] : null; WeaponLibrary2 = Index < Libraries.AWeaponsR.Length ? Libraries.AWeaponsL[Index] : null; } else { if (Weapon >= 0) WeaponLibrary1 = Weapon < Libraries.CWeapons.Length ? Libraries.CWeapons[Weapon] : null; else WeaponLibrary1 = null; WeaponLibrary2 = null; } #endregion #region WingEffects if (WingEffect > 0 && WingEffect < 100) { if (altAnim) WingLibrary = (WingEffect - 1) < Libraries.AHumEffect.Length ? Libraries.AHumEffect[WingEffect - 1] : null; else WingLibrary = (WingEffect - 1) < Libraries.CHumEffect.Length ? Libraries.CHumEffect[WingEffect - 1] : null; } #endregion #region Offsets ArmourOffSet = Gender == MirGender.Male ? 0 : altAnim ? 512 : 808; HairOffSet = Gender == MirGender.Male ? 0 : altAnim ? 512 : 808; WeaponOffSet = Gender == MirGender.Male ? 0 : altAnim ? 512 : 416; WingOffset = Gender == MirGender.Male ? 0 : altAnim ? 544 : 840; MountOffset = 0; #endregion break; #endregion #region Others case MirClass.Warrior: case MirClass.Taoist: case MirClass.Wizard: #region Armours BodyLibrary = Armour < Libraries.CArmours.Length ? Libraries.CArmours[Armour] : Libraries.CArmours[0]; HairLibrary = Hair < Libraries.CHair.Length ? Libraries.CHair[Hair] : null; #endregion #region Weapons if (Weapon >= 0) WeaponLibrary1 = Weapon < Libraries.CWeapons.Length ? Libraries.CWeapons[Weapon] : null; else WeaponLibrary1 = null; WeaponLibrary2 = null; #endregion #region WingEffects if (WingEffect > 0 && WingEffect < 100) { WingLibrary = (WingEffect - 1) < Libraries.CHumEffect.Length ? Libraries.CHumEffect[WingEffect - 1] : null; } #endregion #region Offsets ArmourOffSet = Gender == MirGender.Male ? 0 : 808; HairOffSet = Gender == MirGender.Male ? 0 : 808; WeaponOffSet = Gender == MirGender.Male ? 0 : 416; WingOffset = Gender == MirGender.Male ? 0 : 840; MountOffset = 0; #endregion break; #endregion } } #region Common //Harvest if (CurrentAction == MirAction.Harvest && TransformType < 0) { WeaponLibrary1 = 1 < Libraries.CWeapons.Length ? Libraries.CWeapons[1] : null; } //Mounts if (MountType > -1 && RidingMount && showMount) { MountLibrary = MountType < Libraries.Mounts.Length ? Libraries.Mounts[MountType] : null; } else { MountLibrary = null; } //Fishing if (HasFishingRod && showFishing) { if (CurrentAction == MirAction.FishingCast || CurrentAction == MirAction.FishingWait || CurrentAction == MirAction.FishingReel) { WeaponLibrary1 = 0 < Libraries.Fishing.Length ? Libraries.Fishing[Weapon - 49] : null; WeaponLibrary2 = null; WeaponOffSet = -632; } } DieSound = Gender == MirGender.Male ? SoundList.MaleDie : SoundList.FemaleDie; FlinchSound = Gender == MirGender.Male ? SoundList.MaleFlinch : SoundList.FemaleFlinch; #endregion }
private Missile CreateProjectile(int baseIndex, MLibrary library, bool blend, int count, int interval, int skip) { MapObject ob = MapControl.GetObject(TargetID); if (ob != null) TargetPoint = ob.CurrentLocation; int duration = Functions.MaxDistance(CurrentLocation, TargetPoint) * 50; Missile missile = new Missile(library, baseIndex, duration / interval, duration, this, TargetPoint) { Target = ob, Interval = interval, FrameCount = count, Blend = blend, Skip = skip }; Effects.Add(missile); return missile; }
public Missile(MLibrary library, int baseIndex, int count, int duration, MapObject owner, Point target, bool direction16 = true) : base(library, baseIndex, count, duration, owner) { Missiles.Add(this); Source = Owner.CurrentLocation; Destination = target; Direction = direction16 ? MapControl.Direction16(Source, Destination) : (int)Functions.DirectionFromPoint(Source, Destination); }
static Libraries() { //Wiz/War/Tao InitLibrary(ref CArmours, Settings.CArmourPath, "00"); InitLibrary(ref CHair, Settings.CHairPath, "00"); InitLibrary(ref CWeapons, Settings.CWeaponPath, "00"); InitLibrary(ref CWeaponEffect, Settings.CWeaponEffectPath, "00"); InitLibrary(ref CHumEffect, Settings.CHumEffectPath, "00"); //Assassin InitLibrary(ref AArmours, Settings.AArmourPath, "00"); InitLibrary(ref AHair, Settings.AHairPath, "00"); InitLibrary(ref AWeaponsL, Settings.AWeaponPath, "00", " L"); InitLibrary(ref AWeaponsR, Settings.AWeaponPath, "00", " R"); InitLibrary(ref AHumEffect, Settings.AHumEffectPath, "00"); //Archer InitLibrary(ref ARArmours, Settings.ARArmourPath, "00"); InitLibrary(ref ARHair, Settings.ARHairPath, "00"); InitLibrary(ref ARWeapons, Settings.ARWeaponPath, "00"); InitLibrary(ref ARWeaponsS, Settings.ARWeaponPath, "00", " S"); InitLibrary(ref ARHumEffect, Settings.ARHumEffectPath, "00"); //Other InitLibrary(ref Monsters, Settings.MonsterPath, "000"); InitLibrary(ref Gates, Settings.GatePath, "00"); InitLibrary(ref NPCs, Settings.NPCPath, "00"); InitLibrary(ref Mounts, Settings.MountPath, "00"); InitLibrary(ref Fishing, Settings.FishingPath, "00"); InitLibrary(ref Pets, Settings.PetsPath, "00"); InitLibrary(ref Transform, Settings.TransformPath, "00"); InitLibrary(ref TransformMounts, Settings.TransformMountsPath, "00"); InitLibrary(ref TransformEffect, Settings.TransformEffectPath, "00"); InitLibrary(ref TransformWeaponEffect, Settings.TransformWeaponEffectPath, "00"); #region Maplibs //wemade mir2 (allowed from 0-99) MapLibs[0] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Tiles"); MapLibs[1] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Smtiles"); MapLibs[2] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Objects"); for (int i = 2; i < 27; i++) { MapLibs[i + 1] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Objects" + i.ToString()); } //shanda mir2 (allowed from 100-199) MapLibs[100] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Tiles"); for (int i = 1; i < 10; i++) { MapLibs[100 + i] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Tiles" + (i + 1)); } MapLibs[110] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\SmTiles"); for (int i = 1; i < 10; i++) { MapLibs[110 + i] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\SmTiles" + (i + 1)); } MapLibs[120] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Objects"); for (int i = 1; i < 31; i++) { MapLibs[120 + i] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Objects" + (i + 1)); } MapLibs[190] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\AniTiles1"); //wemade mir3 (allowed from 200-299) string[] Mapstate = { "", "wood\\", "sand\\", "snow\\", "forest\\" }; for (int i = 0; i < Mapstate.Length; i++) { MapLibs[200 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Tilesc"); MapLibs[201 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Tiles30c"); MapLibs[202 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Tiles5c"); MapLibs[203 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Smtilesc"); MapLibs[204 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Housesc"); MapLibs[205 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Cliffsc"); MapLibs[206 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Dungeonsc"); MapLibs[207 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Innersc"); MapLibs[208 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Furnituresc"); MapLibs[209 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Wallsc"); MapLibs[210 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "smObjectsc"); MapLibs[211 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Animationsc"); MapLibs[212 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Object1c"); MapLibs[213 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Object2c"); } Mapstate = new string[] { "", "wood", "sand", "snow", "forest" }; //shanda mir3 (allowed from 300-399) for (int i = 0; i < Mapstate.Length; i++) { MapLibs[300 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Tilesc" + Mapstate[i]); MapLibs[301 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Tiles30c" + Mapstate[i]); MapLibs[302 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Tiles5c" + Mapstate[i]); MapLibs[303 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Smtilesc" + Mapstate[i]); MapLibs[304 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Housesc" + Mapstate[i]); MapLibs[305 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Cliffsc" + Mapstate[i]); MapLibs[306 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Dungeonsc" + Mapstate[i]); MapLibs[307 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Innersc" + Mapstate[i]); MapLibs[308 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Furnituresc" + Mapstate[i]); MapLibs[309 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Wallsc" + Mapstate[i]); MapLibs[310 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "smObjectsc" + Mapstate[i]); MapLibs[311 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Animationsc" + Mapstate[i]); MapLibs[312 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Object1c" + Mapstate[i]); MapLibs[313 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Object2c" + Mapstate[i]); } #endregion LoadLibraries(); Thread thread = new Thread(LoadGameLibraries) { IsBackground = true }; thread.Start(); }
public Missile(MLibrary library, int baseIndex, int count, int duration, Point source, Point target) : base(library, baseIndex, count, duration, source) { Missiles.Add(this); Destination = target; Direction = MapControl.Direction16(Source, Destination); }
static Libraries() { //Wiz/War/Tao for (int i = 0; i < CArmours.Length; i++) CArmours[i] = new MLibrary(Settings.CArmourPath + i.ToString("00")); for (int i = 0; i < CHair.Length; i++) CHair[i] = new MLibrary(Settings.CHairPath + i.ToString("00")); for (int i = 0; i < CWeapons.Length; i++) CWeapons[i] = new MLibrary(Settings.CWeaponPath + i.ToString("00")); for (int i = 0; i < CHumEffect.Length; i++) CHumEffect[i] = new MLibrary(Settings.CHumEffectPath + i.ToString("00")); //Assassin for (int i = 0; i < AArmours.Length; i++) AArmours[i] = new MLibrary(Settings.AArmourPath + i.ToString("00")); for (int i = 0; i < AHair.Length; i++) AHair[i] = new MLibrary(Settings.AHairPath + i.ToString("00")); for (int i = 0; i < AWeaponsL.Length; i++) AWeaponsL[i] = new MLibrary(Settings.AWeaponPath + i.ToString("00") + " L"); for (int i = 0; i < AWeaponsR.Length; i++) AWeaponsR[i] = new MLibrary(Settings.AWeaponPath + i.ToString("00") + " R"); for (int i = 0; i < AHumEffect.Length; i++) AHumEffect[i] = new MLibrary(Settings.AHumEffectPath + i.ToString("00")); //Archer for (int i = 0; i < ARArmours.Length; i++) ARArmours[i] = new MLibrary(Settings.ARArmourPath + i.ToString("00")); for (int i = 0; i < ARHair.Length; i++) ARHair[i] = new MLibrary(Settings.ARHairPath + i.ToString("00")); for (int i = 0; i < ARWeapons.Length; i++) ARWeapons[i] = new MLibrary(Settings.ARWeaponPath + i.ToString("00")); for (int i = 0; i < ARWeaponsS.Length; i++) ARWeaponsS[i] = new MLibrary(Settings.ARWeaponPath + i.ToString("00") + " S"); for (int i = 0; i < ARHumEffect.Length; i++) ARHumEffect[i] = new MLibrary(Settings.ARHumEffectPath + i.ToString("00")); //Other for (int i = 0; i < Monsters.Length; i++) Monsters[i] = new MLibrary(Settings.MonsterPath + i.ToString("000")); for (int i = 0; i < Gates.Length; i++) Gates[i] = new MLibrary(Settings.GatePath + i.ToString("00")); for (int i = 0; i < NPCs.Length; i++) NPCs[i] = new MLibrary(Settings.NPCPath + i.ToString("00")); for (int i = 0; i < Mounts.Length; i++) Mounts[i] = new MLibrary(Settings.MountPath + i.ToString("00")); for (int i = 0; i < Fishing.Length; i++) Fishing[i] = new MLibrary(Settings.FishingPath + i.ToString("00")); for (int i = 0; i < Pets.Length; i++) Pets[i] = new MLibrary(Settings.PetsPath + i.ToString("00")); for (int i = 0; i < Transform.Length; i++) Transform[i] = new MLibrary(Settings.TransformPath + i.ToString("00")); for (int i = 0; i < TransformMounts.Length; i++) TransformMounts[i] = new MLibrary(Settings.TransformMountsPath + i.ToString("00")); for (int i = 0; i < TransformEffect.Length; i++) TransformEffect[i] = new MLibrary(Settings.TransformEffectPath + i.ToString("00")); for (int i = 0; i < TransformWeaponEffect.Length; i++) TransformWeaponEffect[i] = new MLibrary(Settings.TransformWeaponEffectPath + i.ToString("00")); #region Maplibs //wemade mir2 (allowed from 0-99) MapLibs[0] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Tiles"); MapLibs[1] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Smtiles"); MapLibs[2] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Objects"); for (int i = 2; i < 24; i++) { MapLibs[i + 1] = new MLibrary(Settings.DataPath + "Map\\WemadeMir2\\Objects" + i.ToString()); } //shanda mir2 (allowed from 100-199) MapLibs[100] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Tiles"); for (int i = 1; i < 10; i++) { MapLibs[100 + i] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Tiles" + (i + 1)); } MapLibs[110] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\SmTiles"); for (int i = 1; i < 10; i++) { MapLibs[110 + i] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\SmTiles" + (i + 1)); } MapLibs[120] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Objects"); for (int i = 1; i < 31; i++) { MapLibs[120 + i] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\Objects" + (i + 1)); } MapLibs[190] = new MLibrary(Settings.DataPath + "Map\\ShandaMir2\\AniTiles1"); //wemade mir3 (allowed from 200-299) string[] Mapstate = { "", "wood\\", "sand\\", "snow\\", "forest\\"}; for (int i = 0; i < Mapstate.Length; i++) { MapLibs[200 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Tilesc"); MapLibs[201 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Tiles30c"); MapLibs[202 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Tiles5c"); MapLibs[203 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Smtilesc"); MapLibs[204 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Housesc"); MapLibs[205 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Cliffsc"); MapLibs[206 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Dungeonsc"); MapLibs[207 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Innersc"); MapLibs[208 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Furnituresc"); MapLibs[209 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Wallsc"); MapLibs[210 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "smObjectsc"); MapLibs[211 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Animationsc"); MapLibs[212 +(i*15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Object1c"); MapLibs[213 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\WemadeMir3\\" + Mapstate[i] + "Object2c"); } Mapstate = new string[] { "", "wood", "sand", "snow", "forest"}; //shanda mir3 (allowed from 300-399) for (int i = 0; i < Mapstate.Length; i++) { MapLibs[300 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Tilesc" + Mapstate[i]); MapLibs[301 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Tiles30c" + Mapstate[i]); MapLibs[302 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Tiles5c" + Mapstate[i]); MapLibs[303 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Smtilesc" + Mapstate[i]); MapLibs[304 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Housesc" + Mapstate[i]); MapLibs[305 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Cliffsc" + Mapstate[i]); MapLibs[306 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Dungeonsc" + Mapstate[i]); MapLibs[307 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Innersc" + Mapstate[i]); MapLibs[308 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Furnituresc" + Mapstate[i]); MapLibs[309 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Wallsc" + Mapstate[i]); MapLibs[310 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "smObjectsc" + Mapstate[i]); MapLibs[311 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Animationsc" + Mapstate[i]); MapLibs[312 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Object1c" + Mapstate[i]); MapLibs[313 + (i * 15)] = new MLibrary(Settings.DataPath + "Map\\ShandaMir3\\" + "Object2c" + Mapstate[i]); } #endregion LoadLibraries(); Thread thread = new Thread(LoadGameLibraries) { IsBackground = true }; thread.Start(); }
public InterruptionEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, long starttime = 0) : base(library, baseIndex, count, duration, owner) { Repeat = true; Blend = blend; effectlist.Add(this); }
private static void LoadGameLibraries() { Count = MapLibs.Length + Monsters.Length + Gates.Length + NPCs.Length + CArmours.Length + CHair.Length + CWeapons.Length + CWeaponEffect.Length + AArmours.Length + AHair.Length + AWeaponsL.Length + AWeaponsR.Length + ARArmours.Length + ARHair.Length + ARWeapons.Length + ARWeaponsS.Length + CHumEffect.Length + AHumEffect.Length + ARHumEffect.Length + Mounts.Length + Fishing.Length + Pets.Length + Transform.Length + TransformMounts.Length + TransformEffect.Length + TransformWeaponEffect.Length + 17; Dragon.Initialize(); Progress++; BuffIcon.Initialize(); Progress++; Help.Initialize(); Progress++; MiniMap.Initialize(); Progress++; MagIcon.Initialize(); Progress++; MagIcon2.Initialize(); Progress++; Magic.Initialize(); Progress++; Magic2.Initialize(); Progress++; Magic3.Initialize(); Progress++; MagicC.Initialize(); Progress++; Effect.Initialize(); Progress++; GuildSkill.Initialize(); Progress++; Background.Initialize(); Progress++; Deco.Initialize(); Progress++; Items.Initialize(); Progress++; StateItems.Initialize(); Progress++; FloorItems.Initialize(); Progress++; for (int i = 0; i < MapLibs.Length; i++) { if (MapLibs[i] == null) { MapLibs[i] = new MLibrary(""); } else { MapLibs[i].Initialize(); } Progress++; } for (int i = 0; i < Monsters.Length; i++) { Monsters[i].Initialize(); Progress++; } for (int i = 0; i < Gates.Length; i++) { Gates[i].Initialize(); Progress++; } for (int i = 0; i < NPCs.Length; i++) { NPCs[i].Initialize(); Progress++; } for (int i = 0; i < CArmours.Length; i++) { CArmours[i].Initialize(); Progress++; } for (int i = 0; i < CHair.Length; i++) { CHair[i].Initialize(); Progress++; } for (int i = 0; i < CWeapons.Length; i++) { CWeapons[i].Initialize(); Progress++; } for (int i = 0; i < CWeaponEffect.Length; i++) { CWeaponEffect[i].Initialize(); Progress++; } for (int i = 0; i < AArmours.Length; i++) { AArmours[i].Initialize(); Progress++; } for (int i = 0; i < AHair.Length; i++) { AHair[i].Initialize(); Progress++; } for (int i = 0; i < AWeaponsL.Length; i++) { AWeaponsL[i].Initialize(); Progress++; } for (int i = 0; i < AWeaponsR.Length; i++) { AWeaponsR[i].Initialize(); Progress++; } for (int i = 0; i < ARArmours.Length; i++) { ARArmours[i].Initialize(); Progress++; } for (int i = 0; i < ARHair.Length; i++) { ARHair[i].Initialize(); Progress++; } for (int i = 0; i < ARWeapons.Length; i++) { ARWeapons[i].Initialize(); Progress++; } for (int i = 0; i < ARWeaponsS.Length; i++) { ARWeaponsS[i].Initialize(); Progress++; } for (int i = 0; i < CHumEffect.Length; i++) { CHumEffect[i].Initialize(); Progress++; } for (int i = 0; i < AHumEffect.Length; i++) { AHumEffect[i].Initialize(); Progress++; } for (int i = 0; i < ARHumEffect.Length; i++) { ARHumEffect[i].Initialize(); Progress++; } for (int i = 0; i < Mounts.Length; i++) { Mounts[i].Initialize(); Progress++; } for (int i = 0; i < Fishing.Length; i++) { Fishing[i].Initialize(); Progress++; } for (int i = 0; i < Pets.Length; i++) { Pets[i].Initialize(); Progress++; } for (int i = 0; i < Transform.Length; i++) { Transform[i].Initialize(); Progress++; } for (int i = 0; i < TransformEffect.Length; i++) { TransformEffect[i].Initialize(); Progress++; } for (int i = 0; i < TransformWeaponEffect.Length; i++) { TransformWeaponEffect[i].Initialize(); Progress++; } for (int i = 0; i < TransformMounts.Length; i++) { TransformMounts[i].Initialize(); Progress++; } Loaded = true; }
bool loopit = false;//soundloop public ElementsEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, int elementType, int killtime, bool loopon = false) : base(library, baseIndex, count, duration, owner) { Repeat = true; Blend = blend; myType = elementType; killAt = killtime; // loopit = loopon; StopSounds(); StartSound(); }