Advertisement
Archeia

SYF [Soulpour Yanfly Fix] - Party System Swap Fix

Mar 30th, 2014
986
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.97 KB | None | 0 0
  1. # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  2. # SYF [Soulpour Yanfly Fix] - Party System Swap Fix
  3. # Author: Soulpour777
  4. # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  5.  
  6. class Game_Party < Game_Unit
  7.   #--------------------------------------------------------------------------
  8.   # Alias Listings
  9.   #--------------------------------------------------------------------------  
  10.   alias :syf_yanfly_party_swap :swap_order
  11.  
  12.   #--------------------------------------------------------------------------
  13.   # Swap Order
  14.   #--------------------------------------------------------------------------  
  15.   def swap_order(index1, index2)
  16.     id1, id2 = @actors[index1], @actors[index2]
  17.     pos1 = @battle_members_array.index(id1)
  18.     pos2 = @battle_members_array.index(id2)
  19.     @battle_members_array[pos1] = id2 if pos1
  20.     @battle_members_array[pos2] = id1 if pos2
  21.     syf_yanfly_party_swap(index1, index2)
  22.   end
  23.  
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement