@@ -237,12 +237,6 @@ public override bool Link(GameDataLists lists)
237237 return false ;
238238 }
239239
240- if ( LinkedName . Name . GetCodeName ( ) . StartsWith ( "Wyra" ) )
241- {
242- int a = 1 ;
243- a ++ ;
244- }
245-
246240 return true ;
247241 }
248242 }
@@ -331,7 +325,7 @@ public class GameDataNpc : GameData
331325 public List < GameDataCard > LinkedCardsFixed ;
332326 public List < GameDataCard > LinkedCardsVariable ;
333327 public List < GameDataRule > LinkedRules ;
334- public List < GameDataReward > LinkedRewards ;
328+ public List < GameDataCard > LinkedRewards ;
335329
336330 public override string ToString ( ) { return string . Format ( "{0}: {1}" , Id . ToString ( ) , LinkedNpcId != null && LinkedNpcId . LinkedName != null ? LinkedNpcId . LinkedName . Name . GetCodeName ( ) : "" ) ; }
337331 public override bool IsRawDataValid ( CsvLocalizedData rawData ) { return rawData . GetNumColumns ( ) == 31 ; }
@@ -482,19 +476,19 @@ public override bool Link(GameDataLists lists)
482476 LinkedRules . Add ( LinkedRule ) ;
483477 }
484478
485- LinkedRewards = new List < GameDataReward > ( ) ;
479+ LinkedRewards = new List < GameDataCard > ( ) ;
486480 foreach ( var itemName in Rewards )
487481 {
488- var LinkedReward = lists . rewards . Find ( x => ( x . CardName == itemName ) ) ;
482+ var LinkedReward = lists . cards . Find ( x => ( x . LinkedName . Name . GetCodeName ( ) == itemName ) ) ;
489483 if ( LinkedReward == null && itemName . EndsWith ( " Card" ) )
490484 {
491485 var itemName2 = itemName . Substring ( 0 , itemName . Length - 5 ) ;
492486
493- LinkedReward = lists . rewards . Find ( x => ( x . CardName == itemName2 ) ) ;
487+ LinkedReward = lists . cards . Find ( x => ( x . LinkedName . Name . GetCodeName ( ) == itemName2 ) ) ;
494488 if ( LinkedReward == null )
495489 {
496490 var itemName3 = "The " + itemName2 ;
497- LinkedReward = lists . rewards . Find ( x => ( x . CardName == itemName3 ) ) ;
491+ LinkedReward = lists . cards . Find ( x => ( x . LinkedName . Name . GetCodeName ( ) == itemName3 ) ) ;
498492 }
499493 }
500494
@@ -511,42 +505,6 @@ public override bool Link(GameDataLists lists)
511505 }
512506 }
513507
514- public class GameDataReward : GameData
515- {
516- public static readonly string CardItemType = "Triple Triad Card" ;
517-
518- public string CardName ;
519-
520- public GameDataCard LinkedCard ;
521-
522- public override string ToString ( ) { return Id + ": " + CardName ; }
523- public override bool IsRawDataValid ( CsvLocalizedData rawData ) { return rawData . GetNumColumns ( ) >= 90 ; }
524- public override bool IsValid ( ) { return CardName != null ; }
525-
526- public override void Parse ( CsvLocalizedData rawData , int rowIdx )
527- {
528- string [ ] defRow = rawData . data . rows [ rowIdx ] ;
529-
530- if ( defRow [ 16 ] == CardItemType )
531- {
532- Id = int . Parse ( defRow [ 0 ] ) ;
533- CardName = defRow [ 15 ] ;
534- }
535- }
536-
537- public override bool Link ( GameDataLists lists )
538- {
539- LinkedCard = lists . cards . Find ( x => ( x . LinkedName . Name . GetCodeName ( ) == CardName ) ) ;
540- if ( LinkedCard == null )
541- {
542- Logger . WriteLine ( "FAILED link: GameDataReward, Id:{0}, Card:{1}, no matching card name" , Id , CardName ) ;
543- return false ;
544- }
545-
546- return true ;
547- }
548- }
549-
550508 public class GameDataMap : GameData
551509 {
552510 public string Name ;
@@ -708,7 +666,6 @@ public class GameDataLists
708666 public List < GameDataNpcName > npcNames ;
709667 public List < GameDataNpcLocation > npcLocations ;
710668 public List < GameDataNpc > npcs ;
711- public List < GameDataReward > rewards ;
712669 public List < GameDataMap > maps ;
713670 public List < GameDataPlaceName > placeNames ;
714671 public List < GameDataTournamentName > tournamentNames ;
@@ -726,7 +683,6 @@ public void Load(string folderPath)
726683 npcNames = LoadGameData < GameDataNpcName > ( folderPath , "ENpcResident" ) ;
727684 npcLocations = LoadGameData < GameDataNpcLocation > ( folderPath , "Level" ) ;
728685 npcs = LoadGameData < GameDataNpc > ( folderPath , "TripleTriad" ) ;
729- rewards = LoadGameData < GameDataReward > ( folderPath , "Item" ) ;
730686 maps = LoadGameData < GameDataMap > ( folderPath , "Map" ) ;
731687 placeNames = LoadGameData < GameDataPlaceName > ( folderPath , "PlaceName" ) ;
732688
@@ -747,7 +703,6 @@ public bool Link()
747703 result = result && LinkGameData ( npcTriadIds ) ;
748704 result = result && LinkGameData ( npcNames ) ;
749705 result = result && LinkGameData ( npcs ) ;
750- result = result && LinkGameData ( rewards ) ;
751706 result = result && LinkGameData ( npcLocations ) ; // must be after npcs
752707 result = result && LinkGameData ( maps ) ;
753708 result = result && LinkGameData ( placeNames ) ;
0 commit comments