Changeset 788 for trunk/Modules


Ignore:
Timestamp:
Feb 9, 2014, 11:36:25 PM (11 years ago)
Author:
maron
Message:
  • Fixed: Low capitals at name of player in addon
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Export/CreateAddon.php

    r784 r788  
    77 
    88  // 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);
    1718    $Gender = '$G';
    1819    while(strpos($string, $Gender) !== false)
     
    7374    $string = str_replace('$B', '\r\n', $string);
    7475    $string = str_replace('$b', '\r\n', $string);
    75     $string = $this->ReplaceVarInText($string);
     76    $string = $this->ReplaceVarInText($string,'');
    7677    return($string);
    7778  }
Note: See TracChangeset for help on using the changeset viewer.