11using System ;
22using System . Collections . Generic ;
3+ using System . Text ;
34using System . Windows . Forms ;
45
56using Intersect . Editor . Localization ;
@@ -1072,28 +1073,29 @@ private static string GetCommandText(DespawnNpcCommand command, MapInstance map)
10721073
10731074 private static string GetCommandText ( PlayAnimationCommand command , MapInstance map )
10741075 {
1076+ StringBuilder commandTextBuilder = new StringBuilder ( ) ;
10751077 if ( command . MapId != Guid . Empty )
10761078 {
10771079 for ( var i = 0 ; i < MapList . OrderedMaps . Count ; i ++ )
10781080 {
10791081 if ( MapList . OrderedMaps [ i ] . MapId == command . MapId )
10801082 {
1081- return Strings . EventCommandList . playanimation . ToString (
1083+ commandTextBuilder . Append ( Strings . EventCommandList . playanimation . ToString (
10821084 AnimationBase . GetName ( command . AnimationId ) ,
10831085 Strings . EventCommandList . animationonmap . ToString (
10841086 MapList . OrderedMaps [ i ] . Name , command . X , command . Y ,
10851087 Strings . Direction . dir [ ( Direction ) command . Dir ]
10861088 )
1087- ) ;
1089+ ) ) ;
10881090 }
10891091 }
10901092
1091- return Strings . EventCommandList . playanimation . ToString (
1093+ commandTextBuilder . Append ( Strings . EventCommandList . playanimation . ToString (
10921094 AnimationBase . GetName ( command . AnimationId ) ,
10931095 Strings . EventCommandList . animationonmap . ToString (
10941096 Strings . EventCommandList . mapnotfound , command . X , command . Y , Strings . Direction . dir [ ( Direction ) command . Dir ]
10951097 )
1096- ) ;
1098+ ) ) ;
10971099 }
10981100 else
10991101 {
@@ -1117,33 +1119,36 @@ private static string GetCommandText(PlayAnimationCommand command, MapInstance m
11171119
11181120 if ( command . EntityId == Guid . Empty )
11191121 {
1120- return Strings . EventCommandList . playanimation . ToString (
1122+ commandTextBuilder . Append ( Strings . EventCommandList . playanimation . ToString (
11211123 AnimationBase . GetName ( command . AnimationId ) ,
11221124 Strings . EventCommandList . animationonplayer . ToString ( command . X , command . Y , spawnOpt )
1123- ) ;
1125+ ) ) ;
11241126 }
11251127 else
11261128 {
11271129 if ( map . LocalEvents . ContainsKey ( command . EntityId ) )
11281130 {
1129- return Strings . EventCommandList . playanimation . ToString (
1131+ commandTextBuilder . Append ( Strings . EventCommandList . playanimation . ToString (
11301132 AnimationBase . GetName ( command . AnimationId ) ,
11311133 Strings . EventCommandList . animationonevent . ToString (
11321134 map . LocalEvents [ command . EntityId ] . Name , command . X , command . Y , spawnOpt
11331135 )
1134- ) ;
1136+ ) ) ;
11351137 }
11361138 else
11371139 {
1138- return Strings . EventCommandList . playanimation . ToString (
1140+ commandTextBuilder . Append ( Strings . EventCommandList . playanimation . ToString (
11391141 AnimationBase . GetName ( command . AnimationId ) ,
11401142 Strings . EventCommandList . animationonevent . ToString (
11411143 Strings . EventCommandList . deletedevent , command . X , command . Y , spawnOpt
11421144 )
1143- ) ;
1145+ ) ) ;
11441146 }
11451147 }
11461148 }
1149+
1150+ commandTextBuilder . Append ( Strings . EventCommandList . PlayAnimationInstanced . ToString ( command . InstanceToPlayer ) ) ;
1151+ return commandTextBuilder . ToString ( ) ;
11471152 }
11481153
11491154 private static string GetCommandText ( PlayBgmCommand command , MapInstance map )
0 commit comments