diff --git a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/js/saimod_mojotrollz_npc_vendor_template.js b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/js/saimod_mojotrollz_npc_vendor_template.js index e060f6b..11dcb57 100644 --- a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/js/saimod_mojotrollz_npc_vendor_template.js +++ b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/js/saimod_mojotrollz_npc_vendor_template.js @@ -20,4 +20,16 @@ function init_saimod_mojotrollz_npc_vendor_template(){ comments: $('#input_search_comments').val()} system.load('mojotrollz_npc_vendor_template;search.'+JSON.stringify(search),true); }); +} + +function init_saimod_mojotrollz_npc_vendor_template_vendor(){ + $('#btn_search').click(function(){ + entry = $(this).attr('entry'); + search = { item: $('#input_search_item').val(), + maxcount: $('#input_search_maxcount').val(), + incrtime: $('#input_search_incrtime').val(), + extendedcost: $('#input_search_extendedcost').val(), + condition_id: $('#input_search_condition_id').val()} + system.load('mojotrollz_npc_vendor_template_vendor;entry.'+entry+';search.'+JSON.stringify(search),true); + }); } \ No newline at end of file diff --git a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/saimod_mojotrollz_npc_vendor_template.php b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/saimod_mojotrollz_npc_vendor_template.php index 42c5b63..cc22887 100644 --- a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/saimod_mojotrollz_npc_vendor_template.php +++ b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/saimod_mojotrollz_npc_vendor_template.php @@ -5,8 +5,64 @@ class saimod_mojotrollz_npc_vendor_template extends \SYSTEM\SAI\SaiModule { \SQL\NPC_VENDOR_TEMPLATE_COMMENT::QI(array($entry,$comment)); return \JsonResult::ok(); } - public static function sai_mod__SAI_saimod_mojotrollz_npc_vendor_template_action_vendor($entry){ - return 'test'; + public static function sai_mod__SAI_saimod_mojotrollz_npc_vendor_template_action_vendor($entry,$search='{}',$page=0){ + $vars = array(); + $vars['search_item'] = $vars['search_maxcount'] = $vars['search_incrtime'] = $vars['search_extendedcost'] = $vars['search_condition_id'] = ''; + $query = 'SELECT * '. + 'FROM npc_vendor_template WHERE entry = ?'; + $query_vars = array($entry); + $search_ = \json_decode($search,true); + if(\is_array($search_)){ + if(\array_key_exists('item', $search_) && $search_['item'] != ''){ + $query .= ' AND item = ?'; + $query_vars[] = $search_['item']; + $vars['search_item'] = $search_['item']; + } + if(\array_key_exists('maxcount', $search_) && $search_['maxcount'] != ''){ + $query .= ' AND maxcount = ?'; + $query_vars[] = $search_['maxcount']; + $vars['search_maxcount'] = $search_['maxcount']; + } + if(\array_key_exists('incrtime', $search_) && $search_['incrtime'] != ''){ + $query .= ' AND incrtime = ?'; + $query_vars[] = $search_['incrtime']; + $vars['search_incrtime'] = $search_['incrtime']; + } + if(\array_key_exists('extendedcost', $search_) && $search_['extendedcost'] != ''){ + $query .= ' AND extendedcost = ?'; + $query_vars[] = $search_['extendedcost']; + $vars['search_extendedcost'] = $search_['extendedcost']; + } + if(\array_key_exists('condition_id', $search_) && $search_['condition_id'] != ''){ + $query .= ' AND condition_id = ?'; + $query_vars[] = $search_['condition_id']; + $vars['search_condition_id'] = $search_['condition_id']; + } + } + $query_count = 'SELECT COUNT(*) as count FROM ('.$query.') t1'; + $con = new \SYSTEM\DB\Connection(new \SQL\mangos_one_world_test()); + $count = $con->prepare('count_npc_vendor_template_vendor',$query_count,$query_vars)->next()['count']; + $res = $con->prepare('select_npc_vendor_template_vendor', $query, $query_vars); + + $vars['entries'] = ''; + $count_filtered = 0; + $res->seek(100*$page); + while(($row = $res->next()) && ($count_filtered < 100)){ + $vars['entries'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \PSAI(),'saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template_vendor_entry.tpl'), $row); + $count_filtered++; + } + $vars['pagination'] = ''; + $vars['page'] = $page; + $vars['page_last'] = ceil($count/100)-1; + for($i=0;$i < ceil($count/100);$i++){ + $data = array('entry' => $entry, 'page' => $i,'search' => $search, 'active' => ($i == $page) ? 'active' : ''); + $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \PSAI(),'saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template_vendor_pagination.tpl'), $data); + } + $vars['search'] = htmlentities($search); + $vars['count'] = $count_filtered.'/'.$count; + $vars['entry'] = $entry; + $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('basic')); + return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \PSAI(),'saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template_vendor.tpl'), $vars); } public static function sai_mod__SAI_saimod_mojotrollz_npc_vendor_template($search='{}',$page=0){ $vars = array(); @@ -65,7 +121,7 @@ class saimod_mojotrollz_npc_vendor_template extends \SYSTEM\SAI\SaiModule { $data = array('page' => $i,'search' => $search, 'active' => ($i == $page) ? 'active' : ''); $vars['pagination'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \PSAI(),'saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template_pagination.tpl'), $data); } - $vars['search'] = $search; + $vars['search'] = htmlentities($search); $vars['count'] = $count_filtered.'/'.$count; $vars = array_merge($vars, \SYSTEM\PAGE\text::tag('basic')); return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new \PSAI(),'saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template.tpl'), $vars); diff --git a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/sql/mysql/system_api.sql b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/sql/mysql/system_api.sql index 6f208bc..12bdd30 100644 --- a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/sql/mysql/system_api.sql +++ b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/sql/mysql/system_api.sql @@ -2,4 +2,7 @@ INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `nam INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5301, 42, 3, 0, '_SAI_saimod_mojotrollz_npc_vendor_template', 'search', 'JSON'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5302, 42, 3, 0, '_SAI_saimod_mojotrollz_npc_vendor_template', 'page', 'INT'); INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5310, 42, 2, 5300, 'comment', 'entry', 'INT'); -INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5311, 42, 2, 5300, 'comment', 'comment', 'STRING'); \ No newline at end of file +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5311, 42, 2, 5300, 'comment', 'comment', 'STRING'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5320, 42, 2, 5300, 'vendor', 'entry', 'INT'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5321, 42, 3, 5300, 'vendor', 'search', 'JSON'); +INSERT INTO `system_api` (`ID`, `group`, `type`, `parentID`, `parentValue`, `name`, `verify`) VALUES (5322, 42, 3, 5300, 'vendor', 'page', 'INT'); \ No newline at end of file diff --git a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/sql/mysql/system_page.sql b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/sql/mysql/system_page.sql index 57664a3..c25f633 100644 --- a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/sql/mysql/system_page.sql +++ b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/sql/mysql/system_page.sql @@ -1 +1,2 @@ -INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (530, 42, 'mojotrollz_npc_vendor_template', 'mojotrollz_npc_vendor_template', -1, 0, 0, '#content', './sai.php?sai_mod=.SAI.saimod_mojotrollz_npc_vendor_template&search=${search}&page=${page}', 'init_saimod_mojotrollz_npc_vendor_template', '\\SAI\\saimod_mojotrollz_npc_vendor_template'); \ No newline at end of file +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (530, 42, 'mojotrollz_npc_vendor_template', 'mojotrollz_npc_vendor_template', -1, 0, 0, '#content', './sai.php?sai_mod=.SAI.saimod_mojotrollz_npc_vendor_template&search=${search}&page=${page}', 'init_saimod_mojotrollz_npc_vendor_template', '\\SAI\\saimod_mojotrollz_npc_vendor_template'); +INSERT INTO `system_page` (`id`, `group`, `name`, `state`, `parent_id`, `login`, `type`, `div`, `url`, `func`, `php_class`) VALUES (531, 42, 'mojotrollz_npc_vendor_template_vendor', 'mojotrollz_npc_vendor_template_vendor', -1, 0, 0, '#content', './sai.php?sai_mod=.SAI.saimod_mojotrollz_npc_vendor_template&action=vendor&entry=${entry}&search=${search}&page=${page}', 'init_saimod_mojotrollz_npc_vendor_template_vendor', '\\SAI\\saimod_mojotrollz_npc_vendor_template'); \ No newline at end of file diff --git a/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template_vendor.tpl b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template_vendor.tpl new file mode 100644 index 0000000..19298e1 --- /dev/null +++ b/mojotrollz/sai/saimod_mojotrollz_npc_vendor_template/tpl/npc_vendor_template_vendor.tpl @@ -0,0 +1,43 @@ + +
| entry | +item | +maxcount | +incrtime | +ExtendedCost | +condition_id | +actions | +
|---|---|---|---|---|---|---|
| + | ++ + | ++ + | ++ + | ++ + | ++ + | ++ + | +
your original World of Warcraft - The Burning Crusade experience!
mojotrollz.eu is a progressive Realm. This means that parts of the final content get patched in as we go towards the Endgame. Dungeons like Zul\'Aman and Magister\'s Terrace are accessible at later stages of the servers progress. A lot of other changes and implements come along with that, for example Vendors, Arena Seasons and Reputation requirements just to name some.
The Chronology of the patches is leaned to the original Blizzard patch history. Some simplyfications and adjustments had to be made though, because our players have to use the World of Warcraft 2.4.3 client, which makes certain changes impossible, for example with Terrain.
The speed of the progress is determined by two factors: Time and Threshhold.
We will announce certain timeframes of each episode to come, but if a defined Threshhold is reached before the time elapses, the new progress will come earlier. The Threshhold will contain factors like player numbers, dungeon progress and similar variables.
Even though mojotrollz.eu is a blizzlike Server, there is custom content existing on the server. For example for utility reasons, such as the "mojocamp" in Shattrath.
Arena Season 1
Opening Skettis Daily Quest Area The Faction Sha\'tari Skyguards located in the southeast of the Terokkar Forest provides players with multiple daylie Quests for Gold and Reputation. If you become exalted, you can buy an epic riding Mount, the Netherray!
Arena Season 2Farming Badges of Justice gets easier. The keys are the only item that sinks in reputation requirements.

The 25man Raid Dungeons Tempest Keep and Serpent Shrine get accessible. To gain access, you have to do a pre-Quest for each of them. The Dungeonbosses drop T5 Gear, and the final bosses Lady Vashj and Prince Kael\'thas are key to the pre-Quest for Caverns of Time 3 - Mount Hyjal. This Patch is key to the Black Temple.

Opening Ogri\'laThe Daily Quest Region in Blades Edge Mountains is becoming accessible. You can earn Gold and geld Epix with Reputation.
Arena Season 3
Karazhan reliefKara doesn\'t require every Raid Member to possess a key.
You can enter the 10man Raid Dungeon by opening the gate in front of the Dungeon Portal, and let your mates in.
Netherwing factionThe Orcs on the remote flying Mountain in Shadowmoon valley, called "Nethershard", become Questgivers. Their daily Quests reward you with Gold and Reputation. If you get exalted, you can buy a Netherdrake Riding Mount in Lower City in Shattrath.
Arena Season 4
Opening Zul\'AmanThe Troll Temple of Zul\'Aman opens it\'s gates to the Heroes of the Mojotrollz Tribe! G\'eras in Shattrath sells new Badge of Justice rewards, and all Zul\'Aman related Quests and Items become available.
The Cenarion Expedition in Zangar Marsh now sells the Cenarion Warhypogryph to players with Exalted Reputation.
Arena Season 5
At the last stage of the Island Event, the Sunwell will open to the Players. This is the last stage of the original High Level content.
Arena Season 6Vote for your favorit WoW Private Server here.
', 10, 10, '2016-01-04 04:43:52', '2016-01-04 04:43:52'); -REPLACE INTO `system_text_tag` (`id`, `tag`) VALUES ('mojotrollz_servers_text', 'mojotrollz'); \ No newline at end of file +REPLACE INTO `system_text_tag` (`id`, `tag`) VALUES ('mojotrollz_servers_text', 'mojotrollz'); + +-- insert to protect this text +INSERT INTO `system_text` (`id`, `lang`, `text`, `author`, `author_edit`, `time_create`, `time_edit`) VALUES ('mojotrollz_progressive', 'enUS', 'your original World of Warcraft - The Burning Crusade experience!
mojotrollz.eu is a progressive Realm. This means that parts of the final content get patched in as we go towards the Endgame. Dungeons like Zul\'Aman and Magister\'s Terrace are accessible at later stages of the servers progress. A lot of other changes and implements come along with that, for example Vendors, Arena Seasons and Reputation requirements just to name some.
The Chronology of the patches is leaned to the original Blizzard patch history. Some simplyfications and adjustments had to be made though, because our players have to use the World of Warcraft 2.4.3 client, which makes certain changes impossible, for example with Terrain.
The speed of the progress is determined by two factors: Time and Threshhold.
We will announce certain timeframes of each episode to come, but if a defined Threshhold is reached before the time elapses, the new progress will come earlier. The Threshhold will contain factors like player numbers, dungeon progress and similar variables.
Even though mojotrollz.eu is a blizzlike Server, there is custom content existing on the server. For example for utility reasons, such as the "mojocamp" in Shattrath.
Arena Season 1
Opening Skettis Daily Quest Area The Faction Sha\'tari Skyguards located in the southeast of the Terokkar Forest provides players with multiple daylie Quests for Gold and Reputation. If you become exalted, you can buy an epic riding Mount, the Netherray!
Arena Season 2Farming Badges of Justice gets easier. The keys are the only item that sinks in reputation requirements.

The 25man Raid Dungeons Tempest Keep and Serpent Shrine get accessible. To gain access, you have to do a pre-Quest for each of them. The Dungeonbosses drop T5 Gear, and the final bosses Lady Vashj and Prince Kael\'thas are key to the pre-Quest for Caverns of Time 3 - Mount Hyjal. This Patch is key to the Black Temple.

Opening Ogri\'laThe Daily Quest Region in Blades Edge Mountains is becoming accessible. You can earn Gold and geld Epix with Reputation.
Arena Season 3
Karazhan reliefKara doesn\'t require every Raid Member to possess a key.
You can enter the 10man Raid Dungeon by opening the gate in front of the Dungeon Portal, and let your mates in.
Netherwing factionThe Orcs on the remote flying Mountain in Shadowmoon valley, called "Nethershard", become Questgivers. Their daily Quests reward you with Gold and Reputation. If you get exalted, you can buy a Netherdrake Riding Mount in Lower City in Shattrath.
Arena Season 4
Opening Zul\'AmanThe Troll Temple of Zul\'Aman opens it\'s gates to the Heroes of the Mojotrollz Tribe! G\'eras in Shattrath sells new Badge of Justice rewards, and all Zul\'Aman related Quests and Items become available.
The Cenarion Expedition in Zangar Marsh now sells the Cenarion Warhypogryph to players with Exalted Reputation.
Arena Season 5
At the last stage of the Island Event, the Sunwell will open to the Players. This is the last stage of the original High Level content.
Arena Season 6