Ignore:
Timestamp:
Oct 5, 2008, 4:37:22 PM (16 years ago)
Author:
maron
Message:

CZWOW 1.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • client_files/Generate/define.php

    r12 r22  
    22//definice konstant
    33   $dir_out = 'compile/';
     4   $version = '1.1';
    45   $wow = 'CZ';
    56   $where = "Vote > 3 AND Language = 1 AND complete = 1";
     
    910   $ListFile[0] = array(
    1011     "File" => "QuestDescription_1.lua",
    11      "sql" => "SELECT DISTINCT entry, (
    12  SELECT Details FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
    13  ORDER BY vote DESC LIMIT 1
    14 ) as cz, (
    15  SELECT Details FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
    16 ) as en FROM quests as quests_distric
    17 WHERE $where $limit",
    1812     "Header" => $wow."WOW_QuestDescription_count=1;".$wow."WOW_QuestDescription_1={",
    1913     "Footer" => "};if not ".$wow."WOW_QuestDescription then ".$wow."WOW_QuestDescription=0;end;".$wow."WOW_QuestDescription=".$wow."WOW_QuestDescription",
     14     "sql" => "SELECT DISTINCT entry, (
     15 SELECT Details FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
     16 ORDER BY vote DESC LIMIT 1
     17) as cz, (
     18 SELECT Details FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
     19) as en FROM quests as quests_distric
     20WHERE $where_sk $limit",
    2021   );
    2122   $ListFile[1] = array(
    2223     "File" => "QuestObjective_1.lua",
    23      "sql" => "SELECT DISTINCT entry, (
    24  SELECT Objectives FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
    25  ORDER BY vote DESC LIMIT 1
    26 ) as cz, (
    27  SELECT Objectives FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
    28 ) as en FROM quests as quests_distric
    29 WHERE $where $limit",
    3024     "Header" => $wow."WOW_QuestObjective_count=1;".$wow."WOW_QuestObjective_1={",
    3125     "Footer" => "};if not ".$wow."WOW_QuestObjective then ".$wow."WOW_QuestObjective=0; end; ".$wow."WOW_QuestObjective=".$wow."WOW_QuestObjective",
     26     "sql" => "SELECT DISTINCT entry, (
     27 SELECT Objectives FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
     28 ORDER BY vote DESC LIMIT 1
     29) as cz, (
     30 SELECT Objectives FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
     31) as en FROM quests as quests_distric
     32WHERE $where_sk $limit",
    3233   );
    3334   $ListFile[2] = array(
    3435     "File" => "QuestReward_1.lua",
    35      "sql" => "SELECT DISTINCT entry, (
    36  SELECT OfferRewardText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
    37  ORDER BY vote DESC LIMIT 1
    38 ) as cz, (
    39  SELECT OfferRewardText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
    40 ) as en FROM quests as quests_distric
    41 WHERE $where $limit",
    4236     "Header" => $wow."WOW_QuestReward_count=1;".$wow."WOW_QuestReward_1={",
    4337     "Footer" => "};if not ".$wow."WOW_QuestReward then ".$wow."WOW_QuestReward=0; end; ".$wow."WOW_QuestReward=".$wow."WOW_QuestReward",
     38     "sql" => "SELECT DISTINCT entry, (
     39 SELECT OfferRewardText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
     40 ORDER BY vote DESC LIMIT 1
     41) as cz, (
     42 SELECT OfferRewardText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
     43) as en FROM quests as quests_distric
     44WHERE $where_sk $limit",
    4445   );
    4546   $ListFile[3] = array(
    4647     "File" => "QuestProgress_1.lua",
    47      "sql" => "SELECT DISTINCT entry, (
    48  SELECT RequestItemsText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
    49  ORDER BY vote DESC LIMIT 1
    50 ) as cz, (
    51  SELECT RequestItemsText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
    52 ) as en FROM quests as quests_distric
    53 WHERE $where $limit",
    5448     "Header" => $wow."WOW_QuestProgress_count=1;".$wow."WOW_QuestProgress_1={",
    5549     "Footer" => "};if not ".$wow."WOW_QuestProgress then ".$wow."WOW_QuestProgress=0; end; ".$wow."WOW_QuestProgress=".$wow."WOW_QuestProgress",
     50     "sql" => "SELECT DISTINCT entry, (
     51 SELECT RequestItemsText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
     52 ORDER BY vote DESC LIMIT 1
     53) as cz, (
     54 SELECT RequestItemsText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
     55) as en FROM quests as quests_distric
     56WHERE $where_sk $limit",
    5657   );
    5758   $ListFile[4] = array(
    5859     "File" => "BookPage_1.lua",
    59      "sql" => "SELECT DISTINCT entry, (
    60  SELECT Text FROM page_text as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 1 AND complete = 1
     60     "Header" => $wow."WOW_BookPage_count=1;".$wow."WOW_BookPage_1={",
     61     "Footer" => "};if not ".$wow."WOW_BookPage then ".$wow."WOW_BookPage=0; end; ".$wow."WOW_BookPage=".$wow."WOW_BookPage",
     62     "sql" => "SELECT DISTINCT entry, (
     63 SELECT Text FROM page_text as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 2 AND complete = 1
    6164 ORDER BY vote DESC LIMIT 1
    6265) as cz, (
    6366 SELECT Text FROM page_text as text_en WHERE text_en.entry = page_text_distric.entry AND Language = 0 LIMIT 1
    6467) as en FROM page_text as page_text_distric
    65 WHERE $where $limit",
    66      "Header" => $wow."WOW_BookPage_count=1;".$wow."WOW_BookPage_1={",
    67      "Footer" => "};if not ".$wow."WOW_BookPage then ".$wow."WOW_BookPage=0; end; ".$wow."WOW_BookPage=".$wow."WOW_BookPage",
    68    );
     68WHERE $where_sk $limit",
     69   );
     70   
     71   $sql = '';
     72   for ($i=0;$i<8 ;++$i ) {
     73     for ($j=0;$j<2 ;++$j ) {
     74            $sql = $sql."SELECT DISTINCT entry, (
     75 SELECT text".$i."_$j FROM npc_text as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 2 AND complete = 1
     76 ORDER BY vote DESC LIMIT 1
     77) as cz, (
     78 SELECT text".$i."_$j FROM npc_text as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
     79) as en FROM npc_text as npc_text_distric
     80WHERE $where $limit   UNION ";
     81     }
     82   }
     83  $sql = substr($sql, 0, strlen($sql)-7);
    6984   $ListFile[5] = array(
    7085     "File" => "NPCText_1.lua",
    71      "sql" => "SELECT DISTINCT entry, (
    72  SELECT text0_0 FROM npc_text as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 1 AND complete = 1
    73  ORDER BY vote DESC LIMIT 1
    74 ) as cz, (
    75  SELECT text0_0 FROM npc_text as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
    76 ) as en FROM npc_text as npc_text_distric
    77 WHERE $where $limit",
     86     "sql" => $sql,
    7887     "Header" => $wow."WOW_NPCText_count=1;".$wow."WOW_NPCText_1={",
    7988     "Footer" => "};if not ".$wow."WOW_NPCText then ".$wow."WOW_NPCText=0; end; ".$wow."WOW_NPCText=".$wow."WOW_NPCText",
    8089   );
    8190   
    82    //slovenské texty
     91   //èeské texty ================================================================
     92   
     93   
    8394   $ListFile[6] = array(
    8495     "File" => "QuestDescription_2.lua",
    85      "sql" => "SELECT DISTINCT entry, (
    86  SELECT Details FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
    87  ORDER BY vote DESC LIMIT 1
    88 ) as cz, (
    89  SELECT Details FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
    90 ) as en FROM quests as quests_distric
    91 WHERE $where_sk $limit",
    9296     "Header" => $wow."WOW_QuestDescription_count=2;".$wow."WOW_QuestDescription_2={",
    9397     "Footer" => "};if not ".$wow."WOW_QuestDescription then ".$wow."WOW_QuestDescription=0;end;".$wow."WOW_QuestDescription=".$wow."WOW_QuestDescription",
     98     "sql" => "SELECT DISTINCT entry, (
     99 SELECT Details FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
     100 ORDER BY vote DESC LIMIT 1
     101) as cz, (
     102 SELECT Details FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
     103) as en FROM quests as quests_distric
     104WHERE $where $limit",
    94105   );
    95106   $ListFile[7] = array(
    96107     "File" => "QuestObjective_2.lua",
    97      "sql" => "SELECT DISTINCT entry, (
    98  SELECT Objectives FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
    99  ORDER BY vote DESC LIMIT 1
    100 ) as cz, (
    101  SELECT Objectives FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
    102 ) as en FROM quests as quests_distric
    103 WHERE $where_sk $limit",
    104108     "Header" => $wow."WOW_QuestObjective_count=2;".$wow."WOW_QuestObjective_2={",
    105109     "Footer" => "};if not ".$wow."WOW_QuestObjective then ".$wow."WOW_QuestObjective=0; end; ".$wow."WOW_QuestObjective=".$wow."WOW_QuestObjective",
     110     "sql" => "SELECT DISTINCT entry, (
     111 SELECT Objectives FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
     112 ORDER BY vote DESC LIMIT 1
     113) as cz, (
     114 SELECT Objectives FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
     115) as en FROM quests as quests_distric
     116WHERE $where $limit",
    106117   );
    107118   $ListFile[8] = array(
    108119     "File" => "QuestReward_2.lua",
    109      "sql" => "SELECT DISTINCT entry, (
    110  SELECT OfferRewardText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
    111  ORDER BY vote DESC LIMIT 1
    112 ) as cz, (
    113  SELECT OfferRewardText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
    114 ) as en FROM quests as quests_distric
    115 WHERE $where_sk $limit",
    116120     "Header" => $wow."WOW_QuestReward_count=2;".$wow."WOW_QuestReward_2={",
    117121     "Footer" => "};if not ".$wow."WOW_QuestReward then ".$wow."WOW_QuestReward=0; end; ".$wow."WOW_QuestReward=".$wow."WOW_QuestReward",
     122     "sql" => "SELECT DISTINCT entry, (
     123 SELECT OfferRewardText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
     124 ORDER BY vote DESC LIMIT 1
     125) as cz, (
     126 SELECT OfferRewardText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
     127) as en FROM quests as quests_distric
     128WHERE $where $limit",
    118129   );
    119130   $ListFile[9] = array(
    120131     "File" => "QuestProgress_2.lua",
    121      "sql" => "SELECT DISTINCT entry, (
    122  SELECT RequestItemsText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 2 AND complete = 1
    123  ORDER BY vote DESC LIMIT 1
    124 ) as cz, (
    125  SELECT RequestItemsText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
    126 ) as en FROM quests as quests_distric
    127 WHERE $where_sk $limit",
    128132     "Header" => $wow."WOW_QuestProgress_count=2;".$wow."WOW_QuestProgress_2={",
    129133     "Footer" => "};if not ".$wow."WOW_QuestProgress then ".$wow."WOW_QuestProgress=0; end; ".$wow."WOW_QuestProgress=".$wow."WOW_QuestProgress",
     134     "sql" => "SELECT DISTINCT entry, (
     135 SELECT RequestItemsText FROM quests as text_cz WHERE text_cz.entry = quests_distric.entry AND Language = 1 AND complete = 1
     136 ORDER BY vote DESC LIMIT 1
     137) as cz, (
     138 SELECT RequestItemsText FROM quests as text_en WHERE text_en.entry = quests_distric.entry AND Language = 0 LIMIT 1
     139) as en FROM quests as quests_distric
     140WHERE $where $limit",
    130141   );
    131142   $ListFile[10] = array(
    132143     "File" => "BookPage_2.lua",
    133      "sql" => "SELECT DISTINCT entry, (
    134  SELECT Text FROM page_text as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 2 AND complete = 1
     144     "Header" => $wow."WOW_BookPage_count=2;".$wow."WOW_BookPage_2={",
     145     "Footer" => "};if not ".$wow."WOW_BookPage then ".$wow."WOW_BookPage=0; end; ".$wow."WOW_BookPage=".$wow."WOW_BookPage",
     146     "sql" => "SELECT DISTINCT entry, (
     147 SELECT Text FROM page_text as text_cz WHERE text_cz.entry = page_text_distric.entry AND Language = 1 AND complete = 1
    135148 ORDER BY vote DESC LIMIT 1
    136149) as cz, (
    137150 SELECT Text FROM page_text as text_en WHERE text_en.entry = page_text_distric.entry AND Language = 0 LIMIT 1
    138151) as en FROM page_text as page_text_distric
    139 WHERE $where_sk $limit",
    140      "Header" => $wow."WOW_BookPage_count=2;".$wow."WOW_BookPage_2={",
    141      "Footer" => "};if not ".$wow."WOW_BookPage then ".$wow."WOW_BookPage=0; end; ".$wow."WOW_BookPage=".$wow."WOW_BookPage",
    142    );
     152WHERE $where $limit",
     153   );
     154
     155
     156   $sql = '';
     157   for ($i=0;$i<8 ;++$i ) {
     158     for ($j=0;$j<2 ;++$j ) {
     159            $sql = $sql."SELECT DISTINCT entry, (
     160 SELECT text".$i."_$j FROM npc_text as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 1 AND complete = 1
     161 ORDER BY vote DESC LIMIT 1
     162) as cz, (
     163 SELECT text".$i."_$j FROM npc_text as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
     164) as en FROM npc_text as npc_text_distric
     165WHERE $where $limit   UNION ";
     166     }
     167   }
     168  $sql = substr($sql, 0, strlen($sql)-7);
     169
    143170   $ListFile[11] = array(
    144171     "File" => "NPCText_2.lua",
    145      "sql" => "SELECT DISTINCT entry, (
    146  SELECT text0_0 FROM npc_text as text_cz WHERE text_cz.entry = npc_text_distric.entry AND Language = 2 AND complete = 1
    147  ORDER BY vote DESC LIMIT 1
    148 ) as cz, (
    149  SELECT text0_0 FROM npc_text as text_en WHERE text_en.entry = npc_text_distric.entry AND Language = 0 LIMIT 1
    150 ) as en FROM npc_text as npc_text_distric
    151 WHERE $where_sk $limit",
    152172     "Header" => $wow."WOW_NPCText_count=2;".$wow."WOW_NPCText_2={",
    153173     "Footer" => "};if not ".$wow."WOW_NPCText then ".$wow."WOW_NPCText=0; end; ".$wow."WOW_NPCText=".$wow."WOW_NPCText",
     174     "sql" => $sql,
    154175   );
    155176
Note: See TracChangeset for help on using the changeset viewer.