public override void OnActivate(int pinID) { switch (pinID) { case 1: this.Save(); this.ActivateOutputLinks(100); break; case 2: this.Reset(); this.ActivateOutputLinks(100); FlowNodeEvent <FlowNode_OnPartyChange> .Invoke(); break; case 50: this.Save(); this.mSavedPartyID = (int)GlobalVars.SelectedPartyIndex; this.SaveInventory(); this.ActivateOutputLinks(200); break; case 51: this.Reset(); GlobalVars.SelectedPartyIndex.Set(this.mSavedPartyID); this.ResetInventory(); this.ActivateOutputLinks(201); break; } }
public void SetUnitToActivePartySlot() { PartyUnitSlot active = PartyUnitSlot.Active; UnitData dataOfClass1 = DataSource.FindDataOfClass <UnitData>(((Component)this).get_gameObject(), (UnitData)null); if (!Object.op_Inequality((Object)active, (Object)null)) { return; } PartyData dataOfClass2 = DataSource.FindDataOfClass <PartyData>(((Component)active).get_gameObject(), (PartyData)null); if (dataOfClass1 != null) { for (int index = 0; index < dataOfClass2.MAX_UNIT; ++index) { if (dataOfClass2.GetUnitUniqueID(index) == dataOfClass1.UniqueID) { dataOfClass2.SetUnitUniqueID(index, 0L); } } dataOfClass2.SetUnitUniqueID(active.Index, dataOfClass1.UniqueID); } else { dataOfClass2.SetUnitUniqueID(active.Index, 0L); } FlowNodeEvent <FlowNode_OnPartyChange> .Invoke(); }