public FootholdLine(Board board, MapleDot firstDot) : base(board, firstDot) { this._cantThrough = null; this._forbidFallDown = null; this._piece = null; this._force = null; }
public FootholdLine(Board board, MapleDot firstDot, MapleBool forbidFallDown, MapleBool cantThrough, int? piece, int? force) : base(board, firstDot) { this._cantThrough = cantThrough; this._forbidFallDown = forbidFallDown; this._piece = piece; this._force = force; }
public LifeInstance(Board board, SerializationForm json) : base(board, json) { _rx0Shift = json.rx0; _rx1Shift = json.rx1; _yShift = json.yshift; mobTime = json.mobtime; flip = json.flip; hide = json.hide; info = json.info; team = json.team; }
public LifeInstance(MapleDrawableInfo baseInfo, Board board, int x, int y, int rx0Shift, int rx1Shift, int yShift, string limitedname, int? mobTime, MapleBool flip, MapleBool hide, int? info, int? team) : base(board, x, y, -1) { this.limitedname = limitedname; this._rx0Shift = rx0Shift; this._rx1Shift = rx1Shift; this._yShift = yShift; this.mobTime = mobTime; this.info = info; this.team = team; this.flip = flip; if (flip == true) { // We need to use the data from baseInfo directly because BaseInfo property is only instantiated in the child ctor, // which will execute after we are finished. X -= baseInfo.Width - 2 * baseInfo.Origin.X; } }
public PortalInstance(Board board, SerializationForm json) : base(board, json) { _pn = json.pn; _pt = json.pt; _tn = json.tn; _tm = json.tm; _script = json.script; _delay = json.delay; _hideTooltip = json.hidett; _onlyOnce = json.onlyonce; _horizontalImpact = json.himpact; _verticalImpact = json.vimpact; _image = json.image; _hRange = json.hrange; _vRange = json.vrange; baseInfo = PortalInfo.GetPortalInfoByType(pt); }
public PortalInstance(PortalInfo baseInfo, Board board, int x, int y, string pn, string pt, string tn, int tm, string script, int? delay, MapleBool hideTooltip, MapleBool onlyOnce, int? horizontalImpact, int? verticalImpact, string image, int? hRange, int? vRange) : base(board, x, y, -1) { this.baseInfo = baseInfo; _pn = pn; _pt = pt; _tn = tn; _tm = tm; _script = script; _delay = delay; _hideTooltip = hideTooltip; _onlyOnce = onlyOnce; _horizontalImpact = horizontalImpact; _verticalImpact = verticalImpact; _image = image; _hRange = hRange; _vRange = vRange; }
public ObjectInstance(Board board, SerializationForm json) : base(board, json) { baseInfo = ObjectInfo.Get(json.os, json.l0, json.l1, json.l2); flip = json.flip; _r = json.r; name = json.name; _hide = json.hide; _reactor = json.reactor; _flow = json.flow; _rx = json.rx; _ry = json.ry; _cx = json.cx; _cy = json.cy; tags = json.tags; if (json.quest != null) questInfo = json.quest.ToList(); }
public ObjectInstance(ObjectInfo baseInfo, Layer layer, Board board, int x, int y, int z, int zM, MapleBool r, MapleBool hide, MapleBool reactor, MapleBool flow, int? rx, int? ry, int? cx, int? cy, string name, string tags, List<ObjectInstanceQuest> questInfo, bool flip) : base(board, layer, zM, x, y, z) { this.baseInfo = baseInfo; this.flip = flip; this._r = r; this.name = name; this._hide = hide; this._reactor = reactor; this._flow = flow; this._rx = rx; this._ry = ry; this._cx = cx; this._cy = cy; this._tags = tags; this.questInfo = questInfo; if (flip) X -= Width - 2 * Origin.X; }
//private int zM; public ObjectInstance(ObjectInfo baseInfo, Layer layer, Board board, int x, int y, int z, MapleBool r, MapleBool hide, MapleBool reactor, MapleBool flow, int? rx, int? ry, int? cx, int? cy, string name, string tags, List<ObjectInstanceQuest> questInfo, bool flip, bool beforeAdding, string realName = "") : base(board, layer, x, y, z, beforeAdding) { this.baseInfo = baseInfo; this.flip = flip; this._r = r; this.name = name; if (realName != "") this.realName = realName; this._hide = hide; this._reactor = reactor; this._flow = flow; this._rx = rx; this._ry = ry; this._cx = cx; this._cy = cy; this._tags = tags; this.questInfo = questInfo; //this.zM = zM; if (flip) X -= Width - 2 * Origin.X; }
private int? team; //for carnival public LifeInstance(MapleDrawableInfo baseInfo, string type, Board board, int x, int y, int rx0, int rx1, string limitedname, int? mobTime, MapleBool flip, MapleBool hide, int? info, int? team, bool beforeAdding) : base(board, x, y, -1, beforeAdding) { if (type != "m" && type != "n") throw new NotSupportedException("Unknown life type @ LifeInstance..ctor"); this.limitedname = limitedname; this.type = type; this.baseInfo = baseInfo; this._rx0 = rx0; this._rx1 = rx1; this.mobTime = mobTime; this.info = info; this.team = team; this.flip = flip; if (flip == true) X -= Width - 2 * Origin.X; }
/// <summary> /// Constructor /// </summary> /// <param name="image"></param> /// <param name="strMapName"></param> /// <param name="strStreetName"></param> /// <param name="strCategoryName"></param> public MapInfo(WzImage image, string strMapName, string strStreetName, string strCategoryName) { this.image = image; int?startHour; int?endHour; this.strMapName = strMapName; this.strStreetName = strStreetName; this.strCategoryName = strCategoryName; WzFile file = (WzFile)image.WzFileParent; string loggerSuffix = ", map " + image.Name + ((file != null) ? (" of version " + Enum.GetName(typeof(WzMapleVersion), file.MapleVersion) + ", v" + file.Version.ToString()) : ""); foreach (WzImageProperty prop in image["info"].WzProperties) { switch (prop.Name) { case "bgm": bgm = InfoTool.GetString(prop); break; case "cloud": cloud = InfoTool.GetBool(prop); break; case "swim": swim = InfoTool.GetBool(prop); break; case "forcedReturn": forcedReturn = InfoTool.GetInt(prop); break; case "hideMinimap": hideMinimap = InfoTool.GetBool(prop); break; case "mapDesc": mapDesc = InfoTool.GetString(prop); break; case "mapName": mapName = InfoTool.GetString(prop); break; case "mapMark": mapMark = InfoTool.GetString(prop); break; case "mobRate": mobRate = InfoTool.GetFloat(prop); break; case "moveLimit": moveLimit = InfoTool.GetInt(prop); break; case "returnMap": returnMap = InfoTool.GetInt(prop); break; case "town": town = InfoTool.GetBool(prop); break; case "version": version = InfoTool.GetInt(prop); break; case "fieldLimit": long fl = InfoTool.GetLong(prop); fieldLimit = fl; break; case "VRTop": VRTop = InfoTool.GetOptionalInt(prop, 0); break; case "VRBottom": VRBottom = InfoTool.GetOptionalInt(prop, 0); break; case "VRLeft": VRLeft = InfoTool.GetOptionalInt(prop, 0); break; case "VRRight": VRRight = InfoTool.GetOptionalInt(prop, 0); break; case "link": //link = InfoTool.GetInt(prop); break; case "timeLimit": timeLimit = InfoTool.GetInt(prop); break; case "lvLimit": lvLimit = InfoTool.GetInt(prop); break; case "onFirstUserEnter": onFirstUserEnter = InfoTool.GetString(prop); break; case "onUserEnter": onUserEnter = InfoTool.GetString(prop); break; case "fly": fly = InfoTool.GetBool(prop); break; case "noMapCmd": noMapCmd = InfoTool.GetBool(prop); break; case "partyOnly": partyOnly = InfoTool.GetBool(prop); break; case "fieldType": int ft = InfoTool.GetInt(prop); if (!Enum.IsDefined(typeof(FieldType), ft)) { ErrorLogger.Log(ErrorLevel.IncorrectStructure, "Invalid fieldType " + ft.ToString() + loggerSuffix); ft = 0; } fieldType = (FieldType)ft; break; case "miniMapOnOff": miniMapOnOff = InfoTool.GetBool(prop); break; case "reactorShuffle": reactorShuffle = InfoTool.GetBool(prop); break; case "reactorShuffleName": reactorShuffleName = InfoTool.GetString(prop); break; case "personalShop": personalShop = InfoTool.GetBool(prop); break; case "entrustedShop": entrustedShop = InfoTool.GetBool(prop); break; case "effect": effect = InfoTool.GetString(prop); break; case "lvForceMove": lvForceMove = InfoTool.GetInt(prop); break; case "timeMob": startHour = InfoTool.GetOptionalInt(prop["startHour"]); endHour = InfoTool.GetOptionalInt(prop["endHour"]); int? id = InfoTool.GetOptionalInt(prop["id"]); string message = InfoTool.GetOptionalString(prop["message"]); if (id == null || message == null || (startHour == null ^ endHour == null)) { ErrorLogger.Log(ErrorLevel.IncorrectStructure, "timeMob" + loggerSuffix); } else { timeMob = new TimeMob((int?)startHour, (int?)endHour, (int)id, message); } break; case "help": help = InfoTool.GetString(prop); break; case "snow": snow = InfoTool.GetBool(prop); break; case "rain": rain = InfoTool.GetBool(prop); break; case "dropExpire": dropExpire = InfoTool.GetInt(prop); break; case "decHP": decHP = InfoTool.GetInt(prop); break; case "decInterval": decInterval = InfoTool.GetInt(prop); break; case "autoLieDetector": startHour = InfoTool.GetOptionalInt(prop["startHour"]); endHour = InfoTool.GetOptionalInt(prop["endHour"]); int?interval = InfoTool.GetOptionalInt(prop["interval"]); int?propInt = InfoTool.GetOptionalInt(prop["prop"]); if (startHour == null || endHour == null || interval == null || propInt == null) { ErrorLogger.Log(ErrorLevel.IncorrectStructure, "autoLieDetector" + loggerSuffix); } else { autoLieDetector = new AutoLieDetector((int)startHour, (int)endHour, (int)interval, (int)propInt); } break; case "expeditionOnly": expeditionOnly = InfoTool.GetBool(prop); break; case "fs": fs = InfoTool.GetFloat(prop); break; case "protectItem": protectItem = InfoTool.GetInt(prop); break; case "createMobInterval": createMobInterval = InfoTool.GetInt(prop); break; case "fixedMobCapacity": fixedMobCapacity = InfoTool.GetInt(prop); break; case "streetName": streetName = InfoTool.GetString(prop); break; case "noRegenMap": noRegenMap = InfoTool.GetBool(prop); break; case "allowedItem": allowedItem = new List <int>(); if (prop.WzProperties != null && prop.WzProperties.Count > 0) { foreach (WzImageProperty item in prop.WzProperties) { allowedItem.Add(item.GetInt()); } } break; case "recovery": recovery = InfoTool.GetFloat(prop); break; case "blockPBossChange": blockPBossChange = InfoTool.GetBool(prop); break; case "everlast": everlast = InfoTool.GetBool(prop); break; case "damageCheckFree": damageCheckFree = InfoTool.GetBool(prop); break; case "dropRate": dropRate = InfoTool.GetFloat(prop); break; case "scrollDisable": scrollDisable = InfoTool.GetBool(prop); break; case "needSkillForFly": needSkillForFly = InfoTool.GetBool(prop); break; case "zakum2Hack": zakum2Hack = InfoTool.GetBool(prop); break; case "allMoveCheck": allMoveCheck = InfoTool.GetBool(prop); break; case "VRLimit": VRLimit = InfoTool.GetBool(prop); break; case "consumeItemCoolTime": consumeItemCoolTime = InfoTool.GetBool(prop); break; case "zeroSideOnly": zeroSideOnly = InfoTool.GetBool(prop); break; case "mirror_Bottom": mirror_Bottom = InfoTool.GetBool(prop); break; case "AmbientBGM": case "AmbientBGMv": case "areaCtrl": case "onlyUseSkill": case "limitUseShop": case "limitUseTrunk": case "freeFallingVX": case "midAirAccelVX": case "midAirDecelVX": case "jumpSpeedR": case "jumpAccUpKey": case "jumpAccDownKey": case "jumpApplyVX": case "dashSkill": case "speedMaxOver": case "speedMaxOver ": // with a space, stupid nexon case "isSpecialMoveCheck": case "forceSpeed": case "forceJump": case "forceUseIndie": case "vanishPet": case "vanishAndroid": case "vanishDragon": case "limitUI": case "largeSplit": case "qrLimit": case "noChair": case "fieldScript": case "standAlone": case "partyStandAlone": case "HobbangKing": case "quarterView": case "MRLeft": case "MRTop": case "MRRight": case "MRBottom": case "limitSpeedAndJump": case "directionInfo": case "LBSide": case "LBTop": case "LBBottom": case "bgmSub": case "fieldLimit2": case "fieldLimit_tw": case "particle": case "qrLimitJob": case "individualMobPool": case "barrier": case "remoteEffect": case "isFixDec": case "decHPr": case "isDecView": case "forceFadeInTime": case "forceFadeOutTime": case "qrLimitState": case "qrLimitState2": case "difficulty": case "alarm": case "bossMobID": case "reviveCurField": case "ReviveCurFieldOfNoTransfer": case "ReviveCurFieldOfNoTransferPoint": case "limitUserEffectField": case "nofollowCharacter": case "functionObjInfo": case "quest": case "ridingMove": case "ridingField": case "noLanding": case "noCancelSkill": case "defaultAvatarDir": case "footStepSound": case "taggedObjRegenInfo": case "offSoulAbsorption": case "canPartyStatChangeIgnoreParty": case "canPartyStatChangeIgnoreParty ": // with a space case "forceReturnOnDead": case "zoomOutField": case "EscortMinTime": case "deathCount": case "onEnterResetFifthSkill": case "potionLimit": case "lifeCount": case "respawnCooltimeField": case "scale": case "skills": case "noResurection": case "incInterval": case "incMPr": case "bonusExpPerUserHPRate": case "barrierArc": case "noBackOverlapped": case "partyBonusR": case "specialSound": case "inFieldsetForcedReturn": case "chaser": case "chaserEndTime": case "chaserEffect": case "cagePotal": case "cageLT": case "cageRB": case "chaserHoldTime": case "phase": case "boss": case "actionBarIdx": case "shadowzone": case "towerChairEnable": case "DiceMasterUpIndex": case "DiceMasterDownIndex": case "ChangeName": case "entrustedFishing": case "forcedScreenMode": case "isHideUI": case "resetRidingField": case "PL_Gunman": case "noHekatonEffect": case "mode": case "skill": case "MR": case "ratemob": case "bonusStageNoChangeBack": case "questAmbience": case "blockScriptItem": case "remoteTranslucenceView": case "rewardContentName": case "specialDeadAction": case "FriendsStoryBossDelay": case "soulFieldType": case "cameraMoveY": case "subType": case "playTime": case "noEvent": case "forParty": case "whiteOut": case "UserInvisible": case "OnFirstUserEnter": // the same as onFirstUserEnter case "teamPortal": case "typingGame": case "lt": case "rb": case "fieldAttackObj": case "timeLeft": case "timeLeft_d": case "eventSummon": case "rankCheckMob": case "questCheckMob": case "bindSkillLimit": case "NoMobCapacityLimit": case "userTimer": case "eventChairIndex": case "onlyEventChair": case "waitReviveTime": case "RidingTop": case "temporarySkill": case "largeSplt": case "blockTakeOffItem": case "PartyOnly": case "climb": case "bulletConsume": case "gaugeDelay": case "individualPet": case "level": case "hungryMuto": case "property": // map 921172300.img case "spiritSavior": case "standAlonePermitUpgrade": // 993059600.img case "limitHeadAlarmField": // 993180000.img { WzImageProperty cloneProperty = prop.DeepClone(); //cloneProperty.Parent = prop.Parent; unsupportedInfoProperties.Add(cloneProperty); break; } default: ErrorLogger.Log(ErrorLevel.MissingFeature, string.Format("[MapInfo] Unknown field info/ property: '{0}'. {1}. Please fix it at MapInfo.cs", prop.Name, loggerSuffix)); additionalProps.Add(prop.DeepClone()); break; } } }
public MapInfo(WzImage image, string strMapName, string strStreetName) { int? startHour; int? endHour; this.strMapName = strMapName; this.strStreetName = strStreetName; foreach (IWzImageProperty prop in image["info"].WzProperties) switch (prop.Name) { case "bgm": bgm = InfoTool.GetString(prop); break; case "cloud": cloud = InfoTool.GetBool(prop); break; case "swim": swim = InfoTool.GetBool(prop); break; case "forcedReturn": forcedReturn = InfoTool.GetInt(prop); break; case "hideMinimap": hideMinimap = InfoTool.GetBool(prop); break; case "mapDesc": mapDesc = InfoTool.GetString(prop); break; case "mapMark": MapMark = InfoTool.GetString(prop); break; case "mobRate": mobRate = InfoTool.GetFloat(prop); break; case "moveLimit": moveLimit = InfoTool.GetInt(prop); break; case "returnMap": returnMap = InfoTool.GetInt(prop); break; case "town": town = InfoTool.GetBool(prop); break; case "version": version = InfoTool.GetInt(prop); break; case "fieldLimit": int fl = InfoTool.GetInt(prop); if (fl >= (int)Math.Pow(2, 23)) fl = fl & ((int)Math.Pow(2, 23) - 1); fieldLimit = (FieldLimit)fl; break; case "VRTop": case "VRBottom": case "VRLeft": case "VRRight": break; case "link": //link = InfoTool.GetInt(prop); break; case "timeLimit": timeLimit = InfoTool.GetInt(prop); break; case "lvLimit": lvLimit = InfoTool.GetInt(prop); break; case "onFirstUserEnter": onFirstUserEnter = InfoTool.GetString(prop); break; case "onUserEnter": onUserEnter = InfoTool.GetString(prop); break; case "fly": fly = InfoTool.GetBool(prop); break; case "noMapCmd": noMapCmd = InfoTool.GetBool(prop); break; case "partyOnly": partyOnly = InfoTool.GetBool(prop); break; case "fieldType": int ft = InfoTool.GetInt(prop); if (!Enum.IsDefined(typeof(FieldType), ft)) ft = 0; fieldType = (FieldType)ft; break; case "miniMapOnOff": miniMapOnOff = InfoTool.GetBool(prop); break; case "reactorShuffle": reactorShuffle = InfoTool.GetBool(prop); break; case "reactorShuffleName": reactorShuffleName = InfoTool.GetString(prop); break; case "personalShop": personalShop = InfoTool.GetBool(prop); break; case "entrustedShop": entrustedShop = InfoTool.GetBool(prop); break; case "effect": effect = InfoTool.GetString(prop); break; case "lvForceMove": lvForceMove = InfoTool.GetInt(prop); break; case "timeMob": startHour = InfoTool.GetOptionalInt(prop["startHour"]); endHour = InfoTool.GetOptionalInt(prop["endHour"]); int? id = InfoTool.GetOptionalInt(prop["id"]); string message = InfoTool.GetOptionalString(prop["message"]); if (id == null || message == null || (startHour == null ^ endHour == null)) { //System.Windows.Forms.MessageBox.Show("Warning", "Warning - incorrect timeMob structure in map data. Skipped and error log was saved."); WzFile file = (WzFile)image.WzFileParent; if (file != null) ErrorLogger.Log(ErrorLevel.IncorrectStructure, "timeMob, map " + image.Name + " of version " + Enum.GetName(typeof(WzMapleVersion), file.MapleVersion) + ", v" + file.Version.ToString()); } else timeMob = new TimeMob((int?)startHour, (int?)endHour, (int)id, message); break; case "help": help = InfoTool.GetString(prop); break; case "snow": snow = InfoTool.GetBool(prop); break; case "rain": rain = InfoTool.GetBool(prop); break; case "dropExpire": dropExpire = InfoTool.GetInt(prop); break; case "decHP": decHP = InfoTool.GetInt(prop); break; case "decInterval": decInterval = InfoTool.GetInt(prop); break; case "autoLieDetector": startHour = InfoTool.GetOptionalInt(prop["startHour"]); endHour = InfoTool.GetOptionalInt(prop["endHour"]); int? interval = InfoTool.GetOptionalInt(prop["interval"]); int? propInt = InfoTool.GetOptionalInt(prop["prop"]); if (startHour == null || endHour == null || interval == null || propInt == null) { //System.Windows.Forms.MessageBox.Show("Warning", "Warning - incorrect autoLieDetector structure in map data. Skipped and error log was saved."); WzFile file = (WzFile)image.WzFileParent; if (file != null) ErrorLogger.Log(ErrorLevel.IncorrectStructure, "autoLieDetector, map " + image.Name + " of version " + Enum.GetName(typeof(WzMapleVersion), file.MapleVersion) + ", v" + file.Version.ToString()); } else autoLieDetector = new AutoLieDetector((int)startHour, (int)endHour, (int)interval, (int)propInt); break; case "expeditionOnly": expeditionOnly = InfoTool.GetBool(prop); break; case "fs": fs = InfoTool.GetFloat(prop); break; case "protectItem": protectItem = InfoTool.GetInt(prop); break; case "createMobInterval": createMobInterval = InfoTool.GetInt(prop); break; case "fixedMobCapacity": fixedMobCapacity = InfoTool.GetInt(prop); break; case "streetName": streetName = InfoTool.GetString(prop); break; case "noRegenMap": noRegenMap = InfoTool.GetBool(prop); break; case "allowedItems": allowedItems = new List<int>(); if (prop.WzProperties != null && prop.WzProperties.Count > 0) foreach (IWzImageProperty item in prop.WzProperties) allowedItems.Add((int)item); break; case "recovery": recovery = InfoTool.GetFloat(prop); break; case "blockPBossChange": blockPBossChange = InfoTool.GetBool(prop); break; case "everlast": everlast = InfoTool.GetBool(prop); break; case "damageCheckFree": damageCheckFree = InfoTool.GetBool(prop); break; case "dropRate": dropRate = InfoTool.GetFloat(prop); break; case "scrollDisable": scrollDisable = InfoTool.GetBool(prop); break; case "needSkillForFly": needSkillForFly = InfoTool.GetBool(prop); break; case "zakum2Hack": zakum2Hack = InfoTool.GetBool(prop); break; case "allMoveCheck": allMoveCheck = InfoTool.GetBool(prop); break; case "VRLimit": VRLimit = InfoTool.GetBool(prop); break; case "consumeItemCoolTime": consumeItemCoolTime = InfoTool.GetBool(prop); break; default: additionalProps.Add(prop); break; } if (image["info"]["VRLeft"] != null) { IWzImageProperty info = image["info"]; int left = InfoTool.GetInt(info["VRLeft"]); int right = InfoTool.GetInt(info["VRRight"]); int top = InfoTool.GetInt(info["VRTop"]); int bottom = InfoTool.GetInt(info["VRBottom"]); VR = new Rectangle(left, top, right - left, bottom - top); } }
public BoardItem CreateInstance(Board board, int x, int y, int rx0, int rx1, string limitedname, int? mobTime, MapleBool flip, MapleBool hide, int? info, int? team, bool beforeAdding) { if (Image == null) ParseImage(); return new LifeInstance(this, "n", board, x, y, x - UserSettings.Mobrx0Offset, x + UserSettings.Mobrx1Offset, limitedname, mobTime, flip, hide, info, team, beforeAdding); }
public PortalInstance CreateInstance(Board board, int x, int y, bool beforeAdding, string pn, string tn, int tm, string script, int? delay, MapleBool hideTooltip, MapleBool onlyOnce, int? horizontalImpact, int? verticalImpact, string image, int? hRange, int? vRange) { return new PortalInstance(this, board, x, y, beforeAdding, pn, type, tn, tm, script, delay, hideTooltip, onlyOnce, horizontalImpact, verticalImpact, image, hRange, vRange); }
public BoardItem CreateInstance(Layer layer, Board board, int x, int y, int z, MapleBool r, MapleBool hide, MapleBool reactor, MapleBool flow, int? rx, int? ry, int? cx, int? cy, string name, string tags, List<ObjectInstanceQuest> questInfo, bool flip, bool beforeAdding, bool parseOffsets) { ObjectInstance instance = new ObjectInstance(this, layer, board, x, y, z, r, hide, reactor, flow, rx, ry, cx, cy, name, tags, questInfo, flip, beforeAdding); if (parseOffsets) ParseOffsets(instance, layer, board, x, y); return instance; }
public MobInstance(MobInfo baseInfo, Board board, int x, int y, int rx0Shift, int rx1Shift, int yShift, string limitedname, int? mobTime, MapleBool flip, MapleBool hide, int? info, int? team) : base(baseInfo, board, x, y, rx0Shift, rx1Shift, yShift, limitedname, mobTime, flip, hide, info, team) { this.baseInfo = baseInfo; }
public static WzIntProperty SetOptionalBool(MapleBool value) { return(value.HasValue ? SetBool(value.Value) : null); }
public MapInfo(WzImage image, string strMapName, string strStreetName, string strCategoryName) { this.image = image; int? startHour; int? endHour; this.strMapName = strMapName; this.strStreetName = strStreetName; this.strCategoryName = strCategoryName; WzFile file = (WzFile)image.WzFileParent; string loggerSuffix = ", map " + image.Name + ((file != null) ? (" of version " + Enum.GetName(typeof(WzMapleVersion), file.MapleVersion) + ", v" + file.Version.ToString()) : ""); foreach (WzImageProperty prop in image["info"].WzProperties) { switch (prop.Name) { case "bgm": bgm = InfoTool.GetString(prop); break; case "cloud": cloud = InfoTool.GetBool(prop); break; case "swim": swim = InfoTool.GetBool(prop); break; case "forcedReturn": forcedReturn = InfoTool.GetInt(prop); break; case "hideMinimap": hideMinimap = InfoTool.GetBool(prop); break; case "mapDesc": mapDesc = InfoTool.GetString(prop); break; case "mapName": mapName = InfoTool.GetString(prop); break; case "mapMark": mapMark = InfoTool.GetString(prop); break; case "mobRate": mobRate = InfoTool.GetFloat(prop); break; case "moveLimit": moveLimit = InfoTool.GetInt(prop); break; case "returnMap": returnMap = InfoTool.GetInt(prop); break; case "town": town = InfoTool.GetBool(prop); break; case "version": version = InfoTool.GetInt(prop); break; case "fieldLimit": int fl = InfoTool.GetInt(prop); if (fl >= (int)Math.Pow(2, 23)) { ErrorLogger.Log(ErrorLevel.IncorrectStructure, "Invalid fieldlimit " + fl.ToString() + loggerSuffix); fl = fl & ((int)Math.Pow(2, 23) - 1); } fieldLimit = (FieldLimit)fl; break; case "VRTop": case "VRBottom": case "VRLeft": case "VRRight": break; case "link": //link = InfoTool.GetInt(prop); break; case "timeLimit": timeLimit = InfoTool.GetInt(prop); break; case "lvLimit": lvLimit = InfoTool.GetInt(prop); break; case "onFirstUserEnter": onFirstUserEnter = InfoTool.GetString(prop); break; case "onUserEnter": onUserEnter = InfoTool.GetString(prop); break; case "fly": fly = InfoTool.GetBool(prop); break; case "noMapCmd": noMapCmd = InfoTool.GetBool(prop); break; case "partyOnly": partyOnly = InfoTool.GetBool(prop); break; case "fieldType": int ft = InfoTool.GetInt(prop); if (!Enum.IsDefined(typeof(FieldType), ft)) { ErrorLogger.Log(ErrorLevel.IncorrectStructure, "Invalid fieldType " + ft.ToString() + loggerSuffix); ft = 0; } fieldType = (FieldType)ft; break; case "miniMapOnOff": miniMapOnOff = InfoTool.GetBool(prop); break; case "reactorShuffle": reactorShuffle = InfoTool.GetBool(prop); break; case "reactorShuffleName": reactorShuffleName = InfoTool.GetString(prop); break; case "personalShop": personalShop = InfoTool.GetBool(prop); break; case "entrustedShop": entrustedShop = InfoTool.GetBool(prop); break; case "effect": effect = InfoTool.GetString(prop); break; case "lvForceMove": lvForceMove = InfoTool.GetInt(prop); break; case "timeMob": startHour = InfoTool.GetOptionalInt(prop["startHour"]); endHour = InfoTool.GetOptionalInt(prop["endHour"]); int? id = InfoTool.GetOptionalInt(prop["id"]); string message = InfoTool.GetOptionalString(prop["message"]); if (id == null || message == null || (startHour == null ^ endHour == null)) { ErrorLogger.Log(ErrorLevel.IncorrectStructure, "timeMob" + loggerSuffix); } else timeMob = new TimeMob((int?)startHour, (int?)endHour, (int)id, message); break; case "help": help = InfoTool.GetString(prop); break; case "snow": snow = InfoTool.GetBool(prop); break; case "rain": rain = InfoTool.GetBool(prop); break; case "dropExpire": dropExpire = InfoTool.GetInt(prop); break; case "decHP": decHP = InfoTool.GetInt(prop); break; case "decInterval": decInterval = InfoTool.GetInt(prop); break; case "autoLieDetector": startHour = InfoTool.GetOptionalInt(prop["startHour"]); endHour = InfoTool.GetOptionalInt(prop["endHour"]); int? interval = InfoTool.GetOptionalInt(prop["interval"]); int? propInt = InfoTool.GetOptionalInt(prop["prop"]); if (startHour == null || endHour == null || interval == null || propInt == null) { ErrorLogger.Log(ErrorLevel.IncorrectStructure, "autoLieDetector" + loggerSuffix); } else autoLieDetector = new AutoLieDetector((int)startHour, (int)endHour, (int)interval, (int)propInt); break; case "expeditionOnly": expeditionOnly = InfoTool.GetBool(prop); break; case "fs": fs = InfoTool.GetFloat(prop); break; case "protectItem": protectItem = InfoTool.GetInt(prop); break; case "createMobInterval": createMobInterval = InfoTool.GetInt(prop); break; case "fixedMobCapacity": fixedMobCapacity = InfoTool.GetInt(prop); break; case "streetName": streetName = InfoTool.GetString(prop); break; case "noRegenMap": noRegenMap = InfoTool.GetBool(prop); break; case "allowedItem": allowedItem = new List<int>(); if (prop.WzProperties != null && prop.WzProperties.Count > 0) foreach (WzImageProperty item in prop.WzProperties) allowedItem.Add(item.GetInt()); break; case "recovery": recovery = InfoTool.GetFloat(prop); break; case "blockPBossChange": blockPBossChange = InfoTool.GetBool(prop); break; case "everlast": everlast = InfoTool.GetBool(prop); break; case "damageCheckFree": damageCheckFree = InfoTool.GetBool(prop); break; case "dropRate": dropRate = InfoTool.GetFloat(prop); break; case "scrollDisable": scrollDisable = InfoTool.GetBool(prop); break; case "needSkillForFly": needSkillForFly = InfoTool.GetBool(prop); break; case "zakum2Hack": zakum2Hack = InfoTool.GetBool(prop); break; case "allMoveCheck": allMoveCheck = InfoTool.GetBool(prop); break; case "VRLimit": VRLimit = InfoTool.GetBool(prop); break; case "consumeItemCoolTime": consumeItemCoolTime = InfoTool.GetBool(prop); break; default: ErrorLogger.Log(ErrorLevel.MissingFeature, "Unknown Prop: " + prop.Name + loggerSuffix); additionalProps.Add(prop.DeepClone()); break; } } }
public FootholdLine(Board board, MapleDot firstDot, MapleDot secondDot) : base(board, firstDot, secondDot) { _cantThrough = null; _forbidFallDown = null; _piece = null; _force = null; }
public FootholdLine(Board board, SerializationForm json) : base(board) { _cantThrough = json.cantthrough; _forbidFallDown = json.forbidfalldown; _piece = json.piece; _force = json.force; }
public BoardItem CreateInstance(Board board, int x, int y, int rx0Shift, int rx1Shift, int yShift, string limitedname, int? mobTime, MapleBool flip, MapleBool hide, int? info, int? team) { if (Image == null) ParseImage(); return new MobInstance(this, board, x, y, rx0Shift, rx1Shift, yShift, limitedname, mobTime, flip, hide, info, team); }