private EquipData MapRacialEquipModels(Race race, int gender, EquipData eq) { if (Array.IndexOf(RACE_STARTER_GEAR_IDS, eq.model) > -1) { #if DEBUG PluginLog.Log($"Modified {eq.model}, {eq.variant}"); PluginLog.Log($"Race {race}, index {(byte) (race - 1)}, gender {gender}"); #endif eq.model = RACE_STARTER_GEAR_ID_MAP[(byte)race - 1, gender]; eq.variant = 1; #if DEBUG PluginLog.Log($"New {eq.model}, {eq.variant}"); #endif } else { var actor = Marshal.PtrToStructure <Actor>(lastActor); byte objectKind = Marshal.ReadByte(lastActor + ActorOffsets.ObjectKind); if (objectKind == (byte)ObjectKind.BattleNpc || objectKind == (byte)ObjectKind.EventNpc) { eq.model = RACE_STARTER_GEAR_ID_MAP[(byte)lastHumanoidRace - 1, lastHumanoidGender]; eq.variant = 1; } } return(eq); }
private EquipData MapRacialEquipModels(int race, int gender, EquipData eq) { if (Array.IndexOf(RACE_STARTER_GEAR_IDS, eq.model) > -1) { PluginLog.Log($"Modified {eq.model}, {eq.variant}"); PluginLog.Log($"Race {race}, index {race - 1}, gender {gender}"); eq.model = RACE_STARTER_GEAR_ID_MAP[race - 1, gender]; eq.variant = 1; PluginLog.Log($"New {eq.model}, {eq.variant}"); } return(eq); }
private EquipData MapRacialEquipModels(Race race, int gender, EquipData eq) { if (Array.IndexOf(RACE_STARTER_GEAR_IDS, eq.model) > -1) { #if DEBUG PluginLog.Log($"Modified {eq.model}, {eq.variant}"); PluginLog.Log($"Race {race}, index {(byte) (race - 1)}, gender {gender}"); #endif eq.model = RACE_STARTER_GEAR_ID_MAP[(byte)race - 1, gender]; eq.variant = 1; #if DEBUG PluginLog.Log($"New {eq.model}, {eq.variant}"); #endif } return(eq); }