Ignore:
Timestamp:
Sep 11, 2008, 9:10:27 AM (16 years ago)
Author:
george
Message:
  • Aktualizováno: Minimanager 0.12 rev. 99. Opraveno zobrazování honoru, přidána captcha p?i registraci nového účtu a mini fórum.
  • Přidáno: Český překlad pro Minimanager 0.12.
  • Smazáno: Staré fotky fyzického serveru přesunuty do fotogalerie.
  • Přidáno: Nějaké návody na eventy od bbtrashe.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/scripts/fact_tab.php

    r5 r374  
    88 * License: GNU General Public License v2(GPL)
    99 */
     10 
     11$fact_id = Array(
     12//              0    1  2       3              4              5           6           7             8            9               10         11
     13//id => array(name,team,n,reputationListID,BaseRepMask1,BaseRepMask2,BaseRepMask3,BaseRepMask4,BaseRepValue1,BaseRepValue2,BaseRepValue3,BaseRepValue4)
     14  54 => array("Gnomeregan Exiles","Alliance",1,18,1037,690,64,0,3100,-42000,4000,0),
     15  72 => array("Stormwind","Alliance",1,19,1100,690,1,0,3100,-42000,4000,0),
     16  47 => array("Ironforge","Alliance",1,20,1097,690,4,0,3100,-42000,4000,0),
     17  69 => array("Darnassus","Alliance",1,21,1093,690,8,0,3100,-42000,4000,0),
     18  930 => array("Exodar","Alliance",1,49,77,946,1024,0,3000,-42000,4000,0),
     19 
     20  76 => array("Orgrimmar","Horde",2,14,160,1101,2,528,3100,-42000,4000,500),
     21  530 => array("Darkspear Trolls","Horde",2,15,34,1101,528,128,3100,-42000,500,4000),
     22  81 => array("Thunder Bluff","Horde",2,16,130,1101,528,32,3100,-42000,500,4000),
     23  68 => array("Undercity","Horde",2,17,162,1101,16,512,500,-42000,4000,3100),
     24  911 => array("Silvermoon City","Horde",2,55,162,1101,512,16,400,-42000,4000,3100),
     25 
     26  730 => array("Stormpike Guard","Alliance Forces",3,40,1101,690,0,0,0,-42000,0,0),
     27  890 => array("Silverwing Sentinels","Alliance Forces",3,45,1101,690,0,0,0,-42000,0,0),
     28  509 => array("The League of Arathor","Alliance Forces",3,53,1101,690,0,0,0,-42000,0,0),
     29 
     30  729 => array("Frostwolf Clan","Horde Forces",4,41,690,1101,0,0,0,-42000,0,0),
     31  889 => array("Warsong Outriders","Horde Forces",4,46,690,1101,0,0,0,-42000,0,0),
     32  510 => array("The Defilers","Horde Forces",4,52,690,1101,0,0,0,-42000,0,0),
     33 
     34  21 => array("Booty Bay","Steamwheedle Cartel",5,1,1791,0,0,0,500,0,0,0),
     35  369 => array("Gadgetzan","Steamwheedle Cartel",5,7,1791,0,0,0,500,0,0,0),
     36  470 => array("Ratchet","Steamwheedle Cartel",5,9,1791,0,0,0,500,0,0,0),
     37  577 => array("Everlook","Steamwheedle Cartel",5,28,1791,0,0,0,500,0,0,0),
     38 
     39  947 => array("Thrallmar","Outland",6,37,690,1101,0,0,0,-42000,0,0),
     40  946 => array("Honor Hold","Outland",6,38,1101,690,0,0,0,-42000,0,0),
     41  933 => array("The Consortium","Outland",6,60,2047,0,0,0,0,0,0,0),
     42  941 => array("The Mag'har","Outland",6,61,690,1101,0,0,-500,-42000,0,0),
     43  942 => array("Cenarion Expedition","Outland",6,64,2047,0,0,0,0,0,0,0),
     44  970 => array("Sporeggar","Outland",6,65,2047,0,0,0,-2500,0,0,0),
     45  978 => array("Kurenai","Outland",6,66,1101,690,0,0,-1200,-42000,0,0),
     46  1012 => array("Ashtongue Deathsworn","Outland",6,70,1791,0,0,0,0,0,0,0),
     47  1015 => array("Netherwing","Outland",6,71,1791,0,0,0,-42000,0,0,0),
     48  1038 => array("Ogri'la","Outland",6,73,1791,0,0,0,0,0,0,0),
     49 
     50  935 => array("The Sha'tar","Shattrath City",7,39,1791,0,0,0,0,0,0,0),
     51  932 => array("The Aldor","Shattrath City",7,58,255,1024,512,0,0,3500,-3500,0),
     52  934 => array("The Scryers","Shattrath City",7,62,255,1024,512,0,0,-3500,3500,0),
     53  1011 => array("Lower City","Shattrath City",7,69,32767,0,0,0,0,0,0,0),
     54  1031 => array("Sha'tari Skyguard","Shattrath City",7,72,1791,0,0,0,0,0,0,0),
     55 
     56  87 => array("Bloodsail Buccaneers","Other",8,0,1791,0,0,0,-6500,0,0,0),
     57  92 => array("Gelkis Clan Centaur","Other",8,2,1791,0,0,0,2000,0,0,0),
     58  93 => array("Magram Clan Centaur","Other",8,3,1791,0,0,0,2000,0,0,0),
     59  59 => array("Thorium Brotherhood","Other",8,4,1791,0,0,0,0,0,0,0),
     60  349 => array("Ravenholdt","Other",8,5,1791,0,0,0,0,0,0,0),
     61  70 => array("Syndicate","Other",8,6,1791,0,0,0,-10000,0,0,0),
     62  471 => array("Wildhammer Clan","Other",8,8,1097,690,4,0,150,-42000,500,0),
     63  169 => array("Steamwheedle Cartel","Other",8,10,1791,0,0,0,500,0,0,0),
     64  469 => array("Alliance","Other",8,11,1101,690,0,0,3300,-42000,0,0),
     65  67 => array("Horde","Other",8,12,690,1101,0,0,3500,-42000,0,0),
     66  529 => array("Argent Dawn","Other",8,13,1791,0,0,0,200,0,0,0),
     67  86 => array(" Leatherworking - Dragonscale","Other",8,22,1791,0,0,0,2999,0,0,0),
     68  83 => array(" Leatherworking - Elemental","Other",8,23,1791,0,0,0,2999,0,0,0),
     69  549 => array(" Leatherworking - Tribal","Other",8,24,1791,0,0,0,2999,0,0,0),
     70  551 => array(" Engineering - Gnome","Other",8,25,1791,0,0,0,2999,0,0,0),
     71  550 => array(" Engineering - Goblin","Other",8,26,1791,0,0,0,2999,0,0,0),
     72  589 => array("Wintersaber Trainers","Other",8,27,690,1101,0,0,-42000,0,0,0),
     73  46 => array(" Blacksmithing - Armorsmithing","Other",8,29,1791,0,0,0,0,0,0,0),
     74  289 => array(" Blacksmithing - Weaponsmithing","Other",8,30,1791,0,0,0,0,0,0,0),
     75  570 => array(" Blacksmithing - Axesmithing","Other",8,31,1791,0,0,0,0,0,0,0),
     76  571 => array(" Blacksmithing - Swordsmithing","Other",8,32,1791,0,0,0,0,0,0,0),
     77  569 => array(" Blacksmithing - Hammersmithing","Other",8,33,1791,0,0,0,0,0,0,0),
     78  574 => array("Caer Darrow","Other",8,34,1791,0,0,0,0,0,0,0),
     79  576 => array("Timbermaw Hold","Other",8,35,1791,0,0,0,-3500,0,0,0),
     80  609 => array("Cenarion Circle","Other",8,36,1791,40,0,0,0,2000,0,0),
     81  749 => array("Hydraxian Waterlords","Other",8,42,1791,0,0,0,0,0,0,0),
     82  980 => array("Outland","Other",8,43,0,0,0,0,0,0,0,0),
     83  809 => array("Shen'dralar","Other",8,44,1791,0,0,0,0,0,0,0),
     84  891 => array("Alliance Forces","Other",8,47,1101,178,0,0,0,-42000,0,0),
     85  892 => array("Horde Forces","Other",8,48,690,77,0,0,0,-42000,0,0),
     86  909 => array("Darkmoon Faire","Other",8,50,1791,0,0,0,0,0,0,0),
     87  270 => array("Zandalar Tribe","Other",8,51,1791,0,0,0,0,0,0,0),
     88  910 => array("Brood of Nozdormu","Other",8,54,1791,0,0,0,-42000,0,0,0),
     89  922 => array("Tranquillien","Other",8,56,690,1101,0,0,0,-42000,0,0),
     90  990 => array("The Scale of the Sands","Other",8,57,1791,0,0,0,0,0,0,0),
     91  936 => array("Shattrath City","Other",8,59,2047,0,0,0,0,0,0,0),
     92  967 => array("The Violet Eye","Other",8,63,4095,0,0,0,0,0,0,0),
     93  989 => array("Keepers of Time","Other",8,67,1791,0,0,0,0,0,0,0),
     94  1005 => array("Friendly, Hidden","Other",8,68,32767,0,0,0,3000,0,0,0)
     95);   
    1096
    11 $fact_id = Array(
    12 
    13         69 => array(69,"Darnassus","Alliance",1),
    14         54 => array(54,"Gnomeregan Exiles","Alliance",1),
    15         47 => array(47,"Ironforge","Alliance",1),
    16         72 => array(72,"Stormwind","Alliance",1),
    17         930 => array(930,"Exodar","Alliance",1),
    18        
    19         530 => array(530,"Darkspear","Horde",2),
    20         76 => array(76,"Orgrimmar","Horde",2),
    21         81 => array(81,"Thunder Bluff","Horde",2),
    22         68 => array(68,"Undercity","Horde",2),
    23         911 => array(911,"Silvermoon City","Horde",2),
    24 
    25         509 => array(509,"League of Arathor","Battleground Forces - Alliance",3),
    26         890 => array(890,"Silverwing Sentinels","Battleground Forces - Alliance",3),
    27         730 => array(730,"Stormpike Guard","Battleground Forces - Alliance",3),
    28        
    29         510 => array(510,"Forsaken Defilers","Battleground Forces - Horde",4),
    30         729 => array(729,"Frostwolf Clan","Battleground Forces - Horde",4),
    31         889 => array(889,"Warsong Outriders","Battleground Forces - Horde",4),
    32 
    33         21 => array(21,"Booty Bay","Steamwheedle Cartel",5),
    34         577 => array(577,"Everlook","Steamwheedle Cartel",5),
    35         369 => array(369,"Gadgetzan","Steamwheedle Cartel",5),
    36         470 => array(470,"Ratchet","Steamwheedle Cartel",5),
    37 
    38         1012 => array(1012,"Ashtongue Deathsworn","Outland",6),
    39         942 => array(942,"Cenarion Expedition","Outland",6),
    40         933 => array(933,"The Consortium","Outland",6),
    41         946 => array(946,"Honor Hold Alliance Crest","Outland",6),
    42         941 => array(941,"Mag'har Horde Crest","Outland",6),
    43         978 => array(978,"Kurenai Alliance Crest","Outland",6),
    44         1015 => array(1015,"Netherwing","Outland",6),
    45         970 => array(970,"Sporeggar","Outland",6),
    46         947 => array(947,"Thrallmar Horde Crest","Outland",6),
    47        
    48         936 => array(936,"Lower City","Shattrath City",7),
    49         932 => array(932,"The Aldor","Shattrath City",7),
    50         934 => array(934,"The Scryers","Shattrath City",7),
    51         935 => array(935,"The Sha'tar","Shattrath City",7),
    52 
    53         529 => array(529,"Argent Dawn","Other",8),
    54         87 => array(87,"Bloodsail Buccaneers","Other",8),
    55         910 => array(910,"Brood of Nozdormu","Other",8),
    56         609 => array(609,"Cenarion Circle","Other",8),
    57         909 => array(909,"Darkmoon Faire","Other",8),
    58         92 => array(92,"Gelkis Clan Centaur","Other",8),
    59         749 => array(749,"Hydraxian Waterlords","Other",8),
    60         989 => array(989,"Keepers of Time","Other",8),
    61         93 => array(93,"Magram Clan Centaur","Other",8),
    62         349 => array(349,"Ravenholdt","Other",8),
    63         990 => array(990,"Scale of the Sands","Other",8),
    64         809 => array(809,"Shen'dralar","Other",8),
    65         70 => array(70,"Syndicate","Other",8),
    66         59 => array(59,"Thorium Brotherhood","Other",8),
    67         576 => array(576,"Timbermaw Hold","Other",8),
    68         922 => array(922,"Tranquillien Horde Crest","Other",8),
    69         471 => array(471,"Wildhammer Clan","Other",8),
    70         589 => array(589,"Wintersaber Trainers","Other",8),
    71         967 => array(967,"Violet Eye","Other",8),
    72         270 => array(270,"Zandalar Tribe","Other",8)
    73 );
    74 
     97$reputation_rank_length = array(36000, 3000, 3000, 3000, 6000, 12000, 21000, 999);
     98$reputation_cap    =  42999;
     99$reputation_bottom = -42000;
     100$reputation_rank = array( 0 => "Hated", 1 => "Hostile", 2 => "Unfriendly", 3 => "Neutral", 4 => "Friendly", 5 => "Honored", 6 => "Revered", 7 => "Exalted");
     101$MIN_REPUTATION_RANK = 0;
     102$MAX_REPUTATION_RANK = 8;
    75103
    76104function get_faction_name($fid){
    77105 global $lang_id_tab, $fact_id;
    78         if( isset($fact_id[$fid])) return $fact_id[$fid][1];
     106        if( isset($fact_id[$fid])) return $fact_id[$fid][0];
    79107                else  return($lang_id_tab['unknown']);
    80108}
     
    82110function get_faction_tree($fid){
    83111 global $fact_id;
    84         if( isset($fact_id[$fid])) return $fact_id[$fid][3];
     112        if( isset($fact_id[$fid])) return $fact_id[$fid][2];
    85113                else  return 0;
    86114}
    87115
     116function get_base_reputation($fid, $race)
     117{
     118  global $fact_id;
     119
     120  if(!isset($fact_id[$fid])) return 0;
     121 
     122  for ($i = 0; $i < 4; $i++)
     123  {
     124      if ($fact_id[$fid][4 + $i] & (1 << ($race-1)))
     125          return $fact_id[$fid][8 + $i];
     126  }
     127  // in faction.dbc exist factions with (RepListId >=0, listed in character reputation list) with all BaseRepMask[i]==0
     128  return 0;
     129}
     130       
     131function get_reputation($fid, $standing, $race)
     132{
     133   return get_base_reputation($fid, $race) + $standing;
     134}
     135       
     136function get_reputation_rank($fid,  $standing, $race)
     137{
     138    $reputation = get_reputation($fid, $standing, $race);
     139    return reputation_to_rank($reputation);
     140}
     141
     142function get_reputation_at_rank($fid,  $standing, $race)
     143{
     144    $reputation = get_reputation($fid, $standing, $race);
     145    return reputation_at_rank($reputation);
     146}
     147
     148function get_base_reputation_rank($fid, $race)
     149{
     150    $reputation = get_base_reputation($fid, $race);
     151    return reputation_to_rank($reputation);
     152}         
     153       
     154function reputation_to_rank($standing)
     155{
     156    global $reputation_rank_length, $reputation_cap, $reputation_bottom, $reputation_rank, $MIN_REPUTATION_RANK, $MAX_REPUTATION_RANK;
     157
     158    $limit = $reputation_cap;
     159    for ($i = $MAX_REPUTATION_RANK-1; $i >= $MIN_REPUTATION_RANK; --$i)
     160    {
     161        $limit -= $reputation_rank_length[$i];
     162        if ($standing >= $limit )
     163            return $i;
     164    }
     165    return $MIN_REPUTATION_RANK;
     166}
     167
     168function reputation_at_rank($standing)
     169{
     170    global $reputation_rank_length, $reputation_cap, $reputation_bottom, $reputation_rank, $MIN_REPUTATION_RANK, $MAX_REPUTATION_RANK;
     171
     172    $limit = $reputation_cap;
     173    for ($i = $MAX_REPUTATION_RANK-1; $i >= $MIN_REPUTATION_RANK; --$i)
     174    {
     175        $limit -= $reputation_rank_length[$i];
     176        if ($standing >= $limit )
     177            return $standing - $limit;
     178    }
     179    return 0;
     180}
    88181?>
Note: See TracChangeset for help on using the changeset viewer.