Changeset 788 for trunk/Modules
- Timestamp:
- Feb 9, 2014, 11:36:25 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/CreateAddon.php
r784 r788 7 7 8 8 // Replace special codes by lua functions 9 function ReplaceVarInText($string) 10 { 11 $string = str_replace('$N', '"..strlower(UnitName("player")).."', $string); 12 $string = str_replace('$n', '"..strlower(UnitName("player")).."', $string); 13 $string = str_replace('$C', '"..strlower(UnitClass("player")).."', $string); 14 $string = str_replace('$c', '"..strlower(UnitClass("player")).."', $string); 15 $string = str_replace('$R', '"..strlower(UnitRace("player")).."', $string); 16 $string = str_replace('$r', '"..strlower(UnitRace("player")).."', $string); 9 function ReplaceVarInText($string, $strlower = 'strlower') 10 { 11 12 $string = str_replace('$N', '"..'.$strlower.'(UnitName("player")).."', $string); 13 $string = str_replace('$n', '"..'.$strlower.'(UnitName("player")).."', $string); 14 $string = str_replace('$C', '"..'.$strlower.'(UnitClass("player")).."', $string); 15 $string = str_replace('$c', '"..'.$strlower.'(UnitClass("player")).."', $string); 16 $string = str_replace('$R', '"..'.$strlower.'(UnitRace("player")).."', $string); 17 $string = str_replace('$r', '"..'.$strlower.'(UnitRace("player")).."', $string); 17 18 $Gender = '$G'; 18 19 while(strpos($string, $Gender) !== false) … … 73 74 $string = str_replace('$B', '\r\n', $string); 74 75 $string = str_replace('$b', '\r\n', $string); 75 $string = $this->ReplaceVarInText($string );76 $string = $this->ReplaceVarInText($string,''); 76 77 return($string); 77 78 }
Note:
See TracChangeset
for help on using the changeset viewer.