Addition of prime shop support.
This commit is contained in:
parent
5ccf1d455c
commit
0ef150f22a
@ -265,6 +265,14 @@
|
||||
<admin command="admin_setfort" accessLevel="100" />
|
||||
<admin command="admin_removefort" accessLevel="100" />
|
||||
|
||||
<!-- ADMIN ITEM MALL AND GAME POINTS -->
|
||||
<admin command="admin_add_game_points" accessLevel="100" />
|
||||
<admin command="admin_count_game_points" accessLevel="100" />
|
||||
<admin command="admin_gamepoints" accessLevel="100" />
|
||||
<admin command="admin_set_game_points" accessLevel="100" />
|
||||
<admin command="admin_subtract_game_points" accessLevel="100" />
|
||||
<admin command="admin_reload_itemmall" accessLevel="100" />
|
||||
|
||||
<!-- ADMIN GEODATA -->
|
||||
<admin command="admin_geo_pos" accessLevel="30" />
|
||||
<admin command="admin_geo_spawn_pos" accessLevel="30" />
|
||||
|
@ -867,6 +867,18 @@ BotReportDelay = 30
|
||||
# Default: False
|
||||
AllowReportsFromSameClanMembers = False
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Item-Mall (Prime-Shop) Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
# Enable Item-Mall.
|
||||
# Must enable in L2.ini client file.
|
||||
# Default: False
|
||||
EnableItemMall = False
|
||||
|
||||
# Item Id used by item mall.
|
||||
# Default: -1
|
||||
GamePointItemId = -1
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Developer Settings
|
||||
# ---------------------------------------------------------------------------
|
||||
|
242
L2J_Mobius_CT_2.6_HighFive/dist/game/data/ItemMall.xml
vendored
Normal file
242
L2J_Mobius_CT_2.6_HighFive/dist/game/data/ItemMall.xml
vendored
Normal file
@ -0,0 +1,242 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/ItemMall.xsd">
|
||||
<!--
|
||||
category = Enchant 1
|
||||
category = Supplies 2
|
||||
category = Decorating 3
|
||||
category = Package 4
|
||||
category = Others 5
|
||||
category = Event 6
|
||||
category = Best 7
|
||||
category = Event & Best 8
|
||||
-->
|
||||
<product id="1050021" category="2" points="3" item="22025" count="1" /> <!-- Powerful Healing Potion -->
|
||||
<product id="1050022" category="2" points="1" item="22026" count="1" /> <!-- High-grade Healing Potion -->
|
||||
<product id="1080001" category="2" points="200" item="22000" count="1" /> <!-- Small fortuna box -->
|
||||
<product id="1080002" category="2" points="270" item="22001" count="1" /> <!-- Middle fortuna box -->
|
||||
<product id="1080003" category="2" points="405" item="22002" count="1" /> <!-- Large fortuna box -->
|
||||
<product id="1080004" category="2" points="81" item="22003" count="1" /> <!-- Small fortuna cube -->
|
||||
<product id="1080005" category="2" points="216" item="22004" count="1" /> <!-- Middle fortuna cube -->
|
||||
<product id="1080006" category="2" points="324" item="22005" count="1" /> <!-- Large fortuna cube -->
|
||||
<product id="1080009" category="2" points="4" item="22027" count="1" /> <!-- Secret medicine of Will - D grade -->
|
||||
<product id="1080010" category="2" points="13" item="22028" count="1" /> <!-- Secret medicine of Will - C grade -->
|
||||
<product id="1080011" category="2" points="22" item="22029" count="1" /> <!-- Secret medicine of Will - B grade -->
|
||||
<product id="1080012" category="2" points="34" item="22030" count="1" /> <!-- Secret medicine of Will - A grade -->
|
||||
<product id="1080013" category="2" points="49" item="22031" count="1" /> <!-- Secret medicine of Will - S grade -->
|
||||
<product id="1080014" category="2" points="10" item="22032" count="1" /> <!-- Secret medicine of Life - D grade -->
|
||||
<product id="1080015" category="2" points="30" item="22033" count="1" /> <!-- Secret medicine of Life - C grade -->
|
||||
<product id="1080016" category="2" points="54" item="22034" count="1" /> <!-- Secret medicine of Life - B grade -->
|
||||
<product id="1080017" category="2" points="85" item="22035" count="1" /> <!-- Secret medicine of Life - A grade -->
|
||||
<product id="1080018" category="2" points="122" item="22036" count="1" /> <!-- Secret medicine of Life - S grade -->
|
||||
<product id="1080019" category="2" points="4" item="22037" count="1" /> <!-- Potion of Will -->
|
||||
<product id="1080021" category="5" points="4" item="22039" count="1" /> <!-- Wind Walk Scroll -->
|
||||
<product id="1080022" category="2" points="8" item="22040" count="1" /> <!-- Haste Scroll -->
|
||||
<product id="1080023" category="2" points="4" item="22041" count="1" /> <!-- Might Scroll -->
|
||||
<product id="1080024" category="2" points="4" item="22042" count="1" /> <!-- Shield Scroll -->
|
||||
<product id="1080025" category="2" points="8" item="22043" count="1" /> <!-- Death Whisper Scroll -->
|
||||
<product id="1080026" category="2" points="8" item="22044" count="1" /> <!-- Guidance Scroll -->
|
||||
<product id="1080027" category="2" points="8" item="22045" count="1" /> <!-- Empower Scroll -->
|
||||
<product id="1080028" category="2" points="8" item="22046" count="1" /> <!-- Grater Acumen Scroll -->
|
||||
<product id="1080029" category="2" points="8" item="22047" count="1" /> <!-- Vampiric Rage Scroll -->
|
||||
<product id="1080030" category="2" points="8" item="22048" count="1" /> <!-- Bless the Body Scroll -->
|
||||
<product id="1080031" category="2" points="8" item="22049" count="1" /> <!-- Berserker Spirit Scroll -->
|
||||
<product id="1080032" category="2" points="4" item="22050" count="1" /> <!-- Magic Barrier Scroll -->
|
||||
<product id="1080033" category="2" points="8" item="22060" count="1" /> <!-- Rune of SP - 336 Hour Expiration Period -->
|
||||
<product id="1080034" category="2" points="8" item="22061" count="1" /> <!-- Rune of SP - 720 Hour Expiration Period -->
|
||||
<product id="1080035" category="2" points="8" item="22062" count="1" /> <!-- Crystal form Rune - 24 Hour Expiration Period -->
|
||||
<product id="1080048" category="1" points="68" item="22066" count="1" /> <!-- Rune of Feather - 24 Hour Expiration Period -->
|
||||
<product id="1080049" category="4" points="52" item="22087" count="1" /> <!-- A Scroll Bundle of Fighter -->
|
||||
<product id="1080050" category="4" points="59" item="22088" count="1" /> <!-- A Scroll Bundle of Mage -->
|
||||
<product id="1080051" category="4" points="21" item="22089" count="1" /> <!-- Bone Quiver -->
|
||||
<product id="1080052" category="4" points="34" item="22090" count="1" /> <!-- Steel Quiver -->
|
||||
<product id="1080053" category="4" points="48" item="22091" count="1" /> <!-- Silver Quiver -->
|
||||
<product id="1080054" category="4" points="54" item="22092" count="1" /> <!-- Mithril Quiver -->
|
||||
<product id="1080055" category="4" points="68" item="22093" count="1" /> <!-- Quiver of Light -->
|
||||
<product id="1080056" category="4" points="21" item="22149" count="1" /> <!-- Bone Bolt Container -->
|
||||
<product id="1080057" category="4" points="34" item="22150" count="1" /> <!-- Steel Bolt Container -->
|
||||
<product id="1080058" category="4" points="48" item="22151" count="1" /> <!-- Silver Bolt Container -->
|
||||
<product id="1080059" category="4" points="54" item="22152" count="1" /> <!-- Mithril Bolt Container -->
|
||||
<product id="1080060" category="4" points="68" item="22153" count="1" /> <!-- Bolt Container of Light -->
|
||||
<product id="1080061" category="4" points="31" item="22094" count="1" /> <!-- Blessed Spiritshot Pack - D grade -->
|
||||
<product id="1080062" category="4" points="61" item="22095" count="1" /> <!-- Blessed Spiritshot Pack - C grade -->
|
||||
<product id="1080063" category="4" points="166" item="22096" count="1" /> <!-- Blessed Spiritshot Pack - B grade -->
|
||||
<product id="1080064" category="4" points="196" item="22097" count="1" /> <!-- Blessed Spiritshot Pack - A grade -->
|
||||
<product id="1080065" category="4" points="237" item="22098" count="1" /> <!-- Blessed Spiritshot Pack - S grade -->
|
||||
<product id="1080066" category="4" points="12" item="22099" count="1" /> <!-- Spiritshot Pack - D grade -->
|
||||
<product id="1080067" category="4" points="24" item="22100" count="1" /> <!-- Spiritshot Pack - C grade -->
|
||||
<product id="1080068" category="4" points="68" item="22101" count="1" /> <!-- Spiritshot Pack - B grade -->
|
||||
<product id="1080069" category="4" points="81" item="22102" count="1" /> <!-- Spiritshot Pack - A grade -->
|
||||
<product id="1080070" category="4" points="102" item="22103" count="1" /> <!-- Spiritshot Pack - S grade -->
|
||||
<product id="1080071" category="4" points="8" item="22104" count="1" /> <!-- Soulshot Pack - D grade -->
|
||||
<product id="1080072" category="4" points="10" item="22105" count="1" /> <!-- Soulshot Pack - C grade -->
|
||||
<product id="1080073" category="4" points="34" item="22106" count="1" /> <!-- Soulshot Pack - B grade -->
|
||||
<product id="1080074" category="4" points="54" item="22107" count="1" /> <!-- Soulshot Pack - A grade -->
|
||||
<product id="1080075" category="4" points="68" item="22108" count="1" /> <!-- Soulshot Pack - S grade -->
|
||||
<product id="1080076" category="4" points="61" item="22109" count="1" /> <!-- Blessed Spiritshot Large Pack - D grade -->
|
||||
<product id="1080077" category="4" points="122" item="22110" count="1" /> <!-- Blessed Spiritshot Large Pack - C grade -->
|
||||
<product id="1080078" category="4" points="331" item="22111" count="1" /> <!-- Blessed Spiritshot Large Pack - B grade -->
|
||||
<product id="1080079" category="4" points="392" item="22112" count="1" /> <!-- Blessed Spiritshot Large Pack - A grade -->
|
||||
<product id="1080080" category="4" points="473" item="22113" count="1" /> <!-- Blessed Spiritshot Large Pack - S grade -->
|
||||
<product id="1080081" category="4" points="24" item="22114" count="1" /> <!-- Spiritshot Large Pack - D grade -->
|
||||
<product id="1080082" category="4" points="48" item="22115" count="1" /> <!-- Spiritshot Large Pack - C grade -->
|
||||
<product id="1080083" category="4" points="135" item="22116" count="1" /> <!-- Spiritshot Large Pack - B grade -->
|
||||
<product id="1080084" category="4" points="162" item="22117" count="1" /> <!-- Spiritshot Large Pack - A grade -->
|
||||
<product id="1080085" category="4" points="203" item="22118" count="1" /> <!-- Spiritshot Large Pack - S grade -->
|
||||
<product id="1080086" category="4" points="14" item="22119" count="1" /> <!-- Soulshot Large Pack - D grade -->
|
||||
<product id="1080087" category="4" points="21" item="22120" count="1" /> <!-- Soulshot Large Pack - C grade -->
|
||||
<product id="1080088" category="4" points="68" item="22121" count="1" /> <!-- Soulshot Large Pack - B grade -->
|
||||
<product id="1080089" category="4" points="108" item="22122" count="1" /> <!-- Soulshot Large Pack - A grade -->
|
||||
<product id="1080090" category="4" points="135" item="22123" count="1" /> <!-- Soulshot Large Pack - S grade -->
|
||||
<product id="1080091" category="3" points="338" item="22124" count="1" /> <!-- Wrapped daisy hairpin -->
|
||||
<product id="1080092" category="3" points="338" item="22125" count="1" /> <!-- Wrapped forget-me-not hairpin -->
|
||||
<product id="1080093" category="3" points="338" item="22126" count="1" /> <!-- Wrapped outlaws eyepatch -->
|
||||
<product id="1080094" category="3" points="338" item="22127" count="1" /> <!-- Wrapped pirates eyepatch -->
|
||||
<product id="1080095" category="3" points="338" item="22128" count="1" /> <!-- Wrapped Monocle -->
|
||||
<product id="1080096" category="3" points="338" item="22129" count="1" /> <!-- Wrapped Red Mask of Victory -->
|
||||
<product id="1080097" category="3" points="338" item="22130" count="1" /> <!-- Wrapped Red Horn of Victory -->
|
||||
<product id="1080098" category="3" points="338" item="22131" count="1" /> <!-- Wrapped Party Mask -->
|
||||
<product id="1080099" category="3" points="338" item="22132" count="1" /> <!-- Wrapped Red Party Mask -->
|
||||
<product id="1080100" category="3" points="338" item="22133" count="1" /> <!-- Wrapped Cat Ear -->
|
||||
<product id="1080101" category="3" points="338" item="22134" count="1" /> <!-- Wrapped Noblewomans Hairpin -->
|
||||
<product id="1080102" category="3" points="338" item="22135" count="1" /> <!-- Wrapped Raccoon Ear -->
|
||||
<product id="1080103" category="3" points="338" item="22136" count="1" /> <!-- Wrapped Rabbit Ear -->
|
||||
<product id="1080104" category="3" points="338" item="22137" count="1" /> <!-- Wrapped Little Angels Wings -->
|
||||
<product id="1080105" category="3" points="338" item="22138" count="1" /> <!-- Wrapped Fairys Tentacle -->
|
||||
<product id="1080106" category="3" points="338" item="22139" count="1" /> <!-- Wrapped Dandys Chapeau -->
|
||||
<product id="1080107" category="3" points="338" item="22140" count="1" /> <!-- Wrapped Artisans Goggles -->
|
||||
<product id="1080112" category="1" points="33" item="20335" count="1" /> <!-- Rune of Experience: 30% - 5 hour limited time -->
|
||||
<product id="1080113" category="1" points="54" item="20336" count="1" /> <!-- Rune of Exp. Points 50% - 5 Hour Expiration Period -->
|
||||
<product id="1080114" category="1" points="52" item="20337" count="1" /> <!-- Rune of Exp. Points 30% - 10 Hour Expiration Period -->
|
||||
<product id="1080115" category="1" points="87" item="20338" count="1" /> <!-- Rune of Exp. Points 50% - 10 Hour Expiration Period -->
|
||||
<product id="1080116" category="1" points="697" item="20339" count="1" /> <!-- Rune of Exp. Points 30% - 7 Day Expiration Period -->
|
||||
<product id="1080117" category="1" points="1161" item="20340" count="1" /> <!-- Rune of Exp. Points 50% - 7 Day Expiration Period -->
|
||||
<product id="1080118" category="1" points="17" item="20341" count="1" /> <!-- Rune of SP 30% - 5 Hour Expiration Period -->
|
||||
<product id="1080119" category="1" points="27" item="20342" count="1" /> <!-- Rune of SP 50% - 5 Hour Expiration Period -->
|
||||
<product id="1080120" category="1" points="26" item="20343" count="1" /> <!-- Rune of SP 30% - 10 Hour Expiration Period -->
|
||||
<product id="1080121" category="1" points="44" item="20344" count="1" /> <!-- Rune of SP 50% - 10 Hour Expiration Period -->
|
||||
<product id="1080122" category="1" points="349" item="20345" count="1" /> <!-- Rune of SP 30% - 7 Day Expiration Period -->
|
||||
<product id="1080123" category="1" points="581" item="20346" count="1" /> <!-- Rune of SP 50% - 7 Day Expiration Period -->
|
||||
<product id="1080124" category="1" points="33" item="20347" count="1" /> <!-- Rune of Crystal level 3 - 5 Hour Expiration Period -->
|
||||
<product id="1080125" category="1" points="54" item="20348" count="1" /> <!-- Rune of Crystal level 5 - 5 Hour Expiration Period -->
|
||||
<product id="1080126" category="1" points="52" item="20349" count="1" /> <!-- Rune of Crystal level 3 - 10 Hour Expiration Period -->
|
||||
<product id="1080127" category="1" points="87" item="20350" count="1" /> <!-- Rune of Crystal level 5 - 10 Hour Expiration Period -->
|
||||
<product id="1080128" category="1" points="697" item="20351" count="1" /> <!-- Rune of Crystal level 3 - 7 Day Expiration Period -->
|
||||
<product id="1080129" category="1" points="1161" item="20352" count="1" /> <!-- Rune of Crystal level 5 - 7 Day Expiration Period -->
|
||||
<product id="1080130" category="1" points="21" item="12362" count="1" /> <!-- Weapon-Type Enhance Backup Stone (D-Grade) -->
|
||||
<product id="1080131" category="1" points="45" item="12363" count="1" /> <!-- Weapon-Type Enhance Backup Stone (C-Grade) -->
|
||||
<product id="1080132" category="1" points="203" item="12364" count="1" /> <!-- Weapon-Type Enhance Backup Stone (B-Grade) -->
|
||||
<product id="1080133" category="1" points="729" item="12365" count="1" /> <!-- Weapon-Type Enhance Backup Stone (A-Grade) -->
|
||||
<product id="1080134" category="1" points="2025" item="12366" count="1" /> <!-- Weapon-Type Enhance Backup Stone (S-Grade) -->
|
||||
<product id="1080135" category="1" points="4" item="12367" count="1" /> <!-- Armor-Type Enhance Backup Stone (D-Grade) -->
|
||||
<product id="1080136" category="1" points="7" item="12368" count="1" /> <!-- Armor-Type Enhance Backup Stone (C-Grade) -->
|
||||
<product id="1080137" category="1" points="29" item="12369" count="1" /> <!-- Armor-Type Enhance Backup Stone (B-Grade) -->
|
||||
<product id="1080138" category="1" points="104" item="12370" count="1" /> <!-- Armor-Type Enhance Backup Stone (A-Grade) -->
|
||||
<product id="1080139" category="1" points="290" item="12371" count="1" /> <!-- Armor-Type Enhance Backup Stone (S-Grade) -->
|
||||
<product id="1080140" category="4" points="14" item="20326" count="1" /> <!-- Beast Soulshot Pack -->
|
||||
<product id="1080141" category="4" points="11" item="20327" count="1" /> <!-- Beast Spiritshot Pack -->
|
||||
<product id="1080142" category="4" points="68" item="20328" count="1" /> <!-- Blessed Beast Spiritshot Pack -->
|
||||
<product id="1080143" category="4" points="27" item="20329" count="1" /> <!-- Beast Soulshot Large Pack -->
|
||||
<product id="1080144" category="4" points="22" item="20330" count="1" /> <!-- Beast Spiritshot Large Pack -->
|
||||
<product id="1080145" category="4" points="135" item="20331" count="1" /> <!-- Blessed Beast Spiritshot Large Pack -->
|
||||
<product id="1080146" category="5" points="30" item="20364" count="1" /> <!-- Omen Beast Transformation Scroll -->
|
||||
<product id="1080147" category="5" points="30" item="20365" count="1" /> <!-- Death Blader Transformation Scroll -->
|
||||
<product id="1080148" category="5" points="30" item="20366" count="1" /> <!-- Grail Apostle Transformation Scroll -->
|
||||
<product id="1080149" category="5" points="30" item="20367" count="1" /> <!-- Unicorn Transformation Scroll -->
|
||||
<product id="1080150" category="5" points="30" item="20368" count="1" /> <!-- Lilim Knight Transformation Scroll -->
|
||||
<product id="1080151" category="5" points="30" item="20369" count="1" /> <!-- Golem Guardian Transformation Scroll -->
|
||||
<product id="1080152" category="5" points="30" item="20370" count="1" /> <!-- Inferno Drake Transformation Scroll -->
|
||||
<product id="1080153" category="5" points="30" item="20371" count="1" /> <!-- Dragon Bomber Transformation Scroll -->
|
||||
<product id="1080154" category="5" points="27" item="20372" count="1" /> <!-- Escape - Talking Island Village -->
|
||||
<product id="1080155" category="5" points="27" item="20373" count="1" /> <!-- Escape - Elven Village -->
|
||||
<product id="1080156" category="5" points="27" item="20374" count="1" /> <!-- Escape - Dark Elven Village -->
|
||||
<product id="1080157" category="5" points="27" item="20375" count="1" /> <!-- Escape - Orc Village -->
|
||||
<product id="1080158" category="5" points="27" item="20376" count="1" /> <!-- Escape - Dwarven Village -->
|
||||
<product id="1080159" category="5" points="27" item="20377" count="1" /> <!-- Escape - Gludin Village -->
|
||||
<product id="1080160" category="5" points="27" item="20378" count="1" /> <!-- Escape - Town of Gludio -->
|
||||
<product id="1080161" category="5" points="27" item="20379" count="1" /> <!-- Escape - Town of Dion -->
|
||||
<product id="1080162" category="5" points="27" item="20380" count="1" /> <!-- Escape - Floran Village -->
|
||||
<product id="1080163" category="5" points="27" item="20381" count="1" /> <!-- Escape - Giran Castle Town -->
|
||||
<product id="1080164" category="5" points="27" item="20382" count="1" /> <!-- Escape - Hardins Academy -->
|
||||
<product id="1080165" category="5" points="27" item="20383" count="1" /> <!-- Escape - Heine -->
|
||||
<product id="1080166" category="5" points="27" item="20384" count="1" /> <!-- Escape - Town of Oren -->
|
||||
<product id="1080167" category="5" points="27" item="20385" count="1" /> <!-- Escape - Ivory Tower -->
|
||||
<product id="1080168" category="5" points="27" item="20386" count="1" /> <!-- Escape - Hunters Village -->
|
||||
<product id="1080169" category="5" points="27" item="20387" count="1" /> <!-- Escape - Town of Aden -->
|
||||
<product id="1080170" category="5" points="27" item="20388" count="1" /> <!-- Escape - Town of Goddard -->
|
||||
<product id="1080171" category="5" points="27" item="20389" count="1" /> <!-- Escape - Rune Township -->
|
||||
<product id="1080172" category="5" points="27" item="20390" count="1" /> <!-- Escape - Town of Schuttgart -->
|
||||
<product id="1080173" category="5" points="675" item="13015" count="1" /> <!-- My Teleport Spellbook -->
|
||||
<product id="1080174" category="5" points="135" item="13016" count="5" /> <!-- My Teleport Scroll -->
|
||||
<product id="1080175" category="5" points="270" item="13016" count="10" /> <!-- My Teleport Scroll -->
|
||||
<product id="1080176" category="5" points="338" item="20033" count="5" /> <!-- My Teleport Flag -->
|
||||
<product id="1080177" category="5" points="675" item="20033" count="10" /> <!-- My Teleport Flag -->
|
||||
<product id="1080178" category="5" points="338" item="13010" count="5" /> <!-- Extra Entrance Pass - Kamaloka (Hall of the Abyss) -->
|
||||
<product id="1080179" category="5" points="675" item="13010" count="10" /> <!-- Extra Entrance Pass - Kamaloka (Hall of the Abyss) -->
|
||||
<product id="1080180" category="5" points="338" item="13011" count="5" /> <!-- Extra Entrance Pass - Near Kamaloka -->
|
||||
<product id="1080181" category="5" points="675" item="13011" count="10" /> <!-- Extra Entrance Pass - Near Kamaloka -->
|
||||
<product id="1080182" category="5" points="338" item="13012" count="5" /> <!-- Extra Entrance Pass - Kamaloka (Labyrinth of the Abyss) -->
|
||||
<product id="1080183" category="5" points="675" item="13012" count="10" /> <!-- Extra Entrance Pass - Kamaloka (Labyrinth of the Abyss) -->
|
||||
<product id="1080185" category="5" points="268" item="13021" count="1" /> <!-- Color Name -->
|
||||
<product id="1080186" category="3" points="14" item="5592" count="1" /> <!-- Greater CP Potion -->
|
||||
<product id="1080197" category="3" points="142" item="20391" count="1" /> <!-- Potion of Energy Maintenance -->
|
||||
<product id="1080198" category="3" points="68" item="20392" count="1" /> <!-- Potion of Vitality Replenishin -->
|
||||
<product id="1080199" category="5" points="79" item="20393" count="1" /> <!-- Sweet Fruit Cocktail -->
|
||||
<product id="1080200" category="5" points="91" item="20394" count="1" /> <!-- Fresh Fruit Cocktail -->
|
||||
<product id="1080201" category="3" points="338" item="139" count="1" /> <!-- Sudden Agathion 7 Day Pack -->
|
||||
<product id="1080202" category="3" points="338" item="140" count="1" /> <!-- Shiny Agathion 7 Day Pack -->
|
||||
<product id="1080203" category="3" points="338" item="141" count="1" /> <!-- Sobbing Agathion 7 Day Pack -->
|
||||
<product id="1080205" category="3" points="254" item="13370" count="1" /> <!-- Pumpkin Transformation Stick 7-Day Pack (Event) -->
|
||||
<product id="1080206" category="3" points="169" item="13371" count="1" /> <!-- Kat the Cat Hat 7-Day Pack (Event) -->
|
||||
<product id="1080207" category="3" points="169" item="13372" count="1" /> <!-- Feline Queen Hat 7-Day Pack (Event) -->
|
||||
<product id="1080208" category="3" points="169" item="13373" count="1" /> <!-- Monster Eye Hat 7-Day Pack (Event) -->
|
||||
<product id="1080209" category="3" points="169" item="13374" count="1" /> <!-- Brown Bear Hat 7-Day Pack (Event) -->
|
||||
<product id="1080210" category="3" points="169" item="13375" count="1" /> <!-- Fungus Hat 7-Day Pack (Event) -->
|
||||
<product id="1080211" category="3" points="169" item="13376" count="1" /> <!-- Skull Hat 7-Day Pack (Event) -->
|
||||
<product id="1080212" category="3" points="169" item="13377" count="1" /> <!-- Ornithomimus Hat 7-Day Pack (Event) -->
|
||||
<product id="1080213" category="3" points="169" item="13378" count="1" /> <!-- Feline King Hat 7-Day Pack (Event) -->
|
||||
<product id="1080214" category="3" points="169" item="13379" count="1" /> <!-- Kai the Cat Hat 7-Day Pack (Event) -->
|
||||
<product id="1080229" category="3" points="169" item="13380" count="1" /> <!-- OX Stick 7-Day Pack (Event) -->
|
||||
<product id="1080230" category="3" points="506" item="13381" count="1" /> <!-- Rock-Paper-Scissors Stick 7-Day Pack (Event) -->
|
||||
<product id="1080236" category="5" points="199" item="17019" count="1" /> <!-- Mounting Item 3 Pack -->
|
||||
<product id="1080238" category="5" points="89" item="14054" count="1" /> <!-- Steam Beatle Mounting Bracelet - 7-day Limited Period -->
|
||||
<product id="1080239" category="5" points="89" item="13022" count="1" /> <!-- Light Purple-Maned Horse Mounting Bracelet - 7 day limited period -->
|
||||
<product id="1080240" category="5" points="18" item="15438" count="1" /> <!-- 10 minute Energy Maintaining Potion -->
|
||||
<product id="1080241" category="5" points="54" item="15440" count="1" /> <!-- Vitality Maintenance Potion - 30 minutes -->
|
||||
<product id="1080242" category="5" points="24" item="20572" count="1" /> <!-- Rune of Exp. Points 30% - 3 hours limited time -->
|
||||
<product id="1080243" category="5" points="9" item="21084" count="1" /> <!-- Rune of Exp. Points 30% -->
|
||||
<product id="1080244" category="5" points="5" item="21086" count="1" /> <!-- Rune of SP 30% -->
|
||||
<product id="1080245" category="5" points="15" item="21030" count="1" /> <!-- Hardins Divine Protection -->
|
||||
<product id="1080246" category="5" points="15" item="21031" count="1" /> <!-- Hardins Blessing -->
|
||||
<product id="1080247" category="5" points="5" item="21032" count="1" /> <!-- Silpeeds Wing -->
|
||||
<product id="1080248" category="5" points="92" item="21033" count="1" /> <!-- Silpeeds Blessing -->
|
||||
<product id="1080249" category="5" points="1" item="21038" count="1" /> <!-- Potion of a Hero -->
|
||||
<!-- Event -->
|
||||
<product id="1080205" category="6" points="254" item="13370" count="1" /> <!-- Pumpkin Transformation Stick 7-Day Pack (Event) -->
|
||||
<product id="1080206" category="6" points="169" item="13371" count="1" /> <!-- Kat the Cat Hat 7-Day Pack (Event) -->
|
||||
<product id="1080207" category="6" points="169" item="13372" count="1" /> <!-- Feline Queen Hat 7-Day Pack (Event) -->
|
||||
<product id="1080208" category="6" points="169" item="13373" count="1" /> <!-- Monster Eye Hat 7-Day Pack (Event) -->
|
||||
<product id="1080209" category="6" points="169" item="13374" count="1" /> <!-- Brown Bear Hat 7-Day Pack (Event) -->
|
||||
<product id="1080210" category="6" points="169" item="13375" count="1" /> <!-- Fungus Hat 7-Day Pack (Event) -->
|
||||
<product id="1080211" category="6" points="169" item="13376" count="1" /> <!-- Skull Hat 7-Day Pack (Event) -->
|
||||
<product id="1080212" category="6" points="169" item="13377" count="1" /> <!-- Ornithomimus Hat 7-Day Pack (Event) -->
|
||||
<product id="1080213" category="6" points="169" item="13378" count="1" /> <!-- Feline King Hat 7-Day Pack (Event) -->
|
||||
<product id="1080214" category="6" points="169" item="13379" count="1" /> <!-- Kai the Cat Hat 7-Day Pack (Event) -->
|
||||
<product id="1080229" category="6" points="169" item="13380" count="1" /> <!-- OX Stick 7-Day Pack (Event) -->
|
||||
<product id="1080230" category="6" points="506" item="13381" count="1" /> <!-- Rock-Paper-Scissors Stick 7-Day Pack (Event) -->
|
||||
<!-- Best -->
|
||||
<product id="1080076" category="7" points="61" item="22109" count="1" /> <!-- Blessed Spiritshot Large Pack - D grade -->
|
||||
<product id="1080077" category="7" points="122" item="22110" count="1" /> <!-- Blessed Spiritshot Large Pack - C grade -->
|
||||
<product id="1080078" category="7" points="331" item="22111" count="1" /> <!-- Blessed Spiritshot Large Pack - B grade -->
|
||||
<product id="1080079" category="7" points="392" item="22112" count="1" /> <!-- Blessed Spiritshot Large Pack - A grade -->
|
||||
<product id="1080080" category="7" points="473" item="22113" count="1" /> <!-- Blessed Spiritshot Large Pack - S grade -->
|
||||
<product id="1080081" category="7" points="24" item="22114" count="1" /> <!-- Spiritshot Large Pack - D grade -->
|
||||
<product id="1080082" category="7" points="48" item="22115" count="1" /> <!-- Spiritshot Large Pack - C grade -->
|
||||
<product id="1080083" category="7" points="135" item="22116" count="1" /> <!-- Spiritshot Large Pack - B grade -->
|
||||
<product id="1080084" category="7" points="162" item="22117" count="1" /> <!-- Spiritshot Large Pack - A grade -->
|
||||
<product id="1080085" category="7" points="203" item="22118" count="1" /> <!-- Spiritshot Large Pack - S grade -->
|
||||
<product id="1080086" category="7" points="14" item="22119" count="1" /> <!-- Soulshot Large Pack - D grade -->
|
||||
<product id="1080087" category="7" points="21" item="22120" count="1" /> <!-- Soulshot Large Pack - C grade -->
|
||||
<product id="1080088" category="7" points="68" item="22121" count="1" /> <!-- Soulshot Large Pack - B grade -->
|
||||
<product id="1080089" category="7" points="108" item="22122" count="1" /> <!-- Soulshot Large Pack - A grade -->
|
||||
<product id="1080090" category="7" points="135" item="22123" count="1" /> <!-- Soulshot Large Pack - S grade -->
|
||||
</list>
|
@ -45,7 +45,7 @@ Characters Related:<br1>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button value="Party" action="bypass -h admin_partyinfo" width=82 height=20 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td></td>
|
||||
<td><button value="Game Points" action="bypass -h admin_gamepoints" width=82 height=20 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
41
L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/admin/game_points.htm
vendored
Normal file
41
L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/admin/game_points.htm
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
<html>
|
||||
<title>Game Points</title>
|
||||
<body>
|
||||
<table width=270>
|
||||
<tr>
|
||||
<td width=45><button value="Main" action="bypass -h admin_admin" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td width=180>
|
||||
<center>Game Points Menu</center>
|
||||
</td>
|
||||
<td width=45>
|
||||
<center><button value="Back" action="bypass -h admin_admin6" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></center>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table height=60 width=270>
|
||||
<tr>
|
||||
<td>
|
||||
Game Points is a type of currency used by the ingame Item Mall (also known as Prime Shop).
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width=270>
|
||||
<tr>
|
||||
<td width=70 align=right><font color="LEVEL">Value:</font></td>
|
||||
<td>
|
||||
<edit var="qbox" width=120 height=15>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table width=270>
|
||||
<tr>
|
||||
<td><button value="Add" action="bypass -h admin_add_game_points $qbox" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="Subtract" action="bypass -h admin_subtract_game_points $qbox" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="Set" action="bypass -h admin_set_game_points $qbox" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td><button value="Count" action="bypass -h admin_count_game_points" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
@ -47,7 +47,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<td><button value="Crest" action="bypass admin_reload crest" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td></td>
|
||||
<td><button value="Item Mall" action="bypass admin_reload itemmall" width=65 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -76,6 +76,7 @@ import handlers.admincommandhandlers.AdminEvents;
|
||||
import handlers.admincommandhandlers.AdminExpSp;
|
||||
import handlers.admincommandhandlers.AdminFightCalculator;
|
||||
import handlers.admincommandhandlers.AdminFortSiege;
|
||||
import handlers.admincommandhandlers.AdminGamePoints;
|
||||
import handlers.admincommandhandlers.AdminGeodata;
|
||||
import handlers.admincommandhandlers.AdminGm;
|
||||
import handlers.admincommandhandlers.AdminGmChat;
|
||||
@ -354,6 +355,7 @@ public class MasterHandler
|
||||
AdminExpSp.class,
|
||||
AdminFightCalculator.class,
|
||||
AdminFortSiege.class,
|
||||
AdminGamePoints.class,
|
||||
AdminGeodata.class,
|
||||
AdminGm.class,
|
||||
AdminGmChat.class,
|
||||
|
215
L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminGamePoints.java
vendored
Normal file
215
L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/admincommandhandlers/AdminGamePoints.java
vendored
Normal file
@ -0,0 +1,215 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package handlers.admincommandhandlers;
|
||||
|
||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
|
||||
/**
|
||||
* Admin game point commands.
|
||||
* @author Mobius
|
||||
*/
|
||||
public class AdminGamePoints implements IAdminCommandHandler
|
||||
{
|
||||
private static final String[] ADMIN_COMMANDS =
|
||||
{
|
||||
"admin_add_game_points",
|
||||
"admin_count_game_points",
|
||||
"admin_gamepoints",
|
||||
"admin_set_game_points",
|
||||
"admin_subtract_game_points"
|
||||
};
|
||||
|
||||
@Override
|
||||
public boolean useAdminCommand(String command, L2PcInstance activeChar)
|
||||
{
|
||||
if (command.startsWith("admin_add_game_points"))
|
||||
{
|
||||
try
|
||||
{
|
||||
String val = command.substring(22);
|
||||
if (!addGamePoints(activeChar, val))
|
||||
{
|
||||
activeChar.sendMessage("Usage: //add_game_points count");
|
||||
}
|
||||
}
|
||||
catch (StringIndexOutOfBoundsException e)
|
||||
{ // Case of missing parameter
|
||||
activeChar.sendMessage("Usage: //add_game_points count");
|
||||
}
|
||||
}
|
||||
else if (command.equals("admin_count_game_points"))
|
||||
{
|
||||
if ((activeChar.getTarget() != null) && activeChar.getTarget().isPlayer())
|
||||
{
|
||||
L2PcInstance target = (L2PcInstance) activeChar.getTarget();
|
||||
activeChar.sendMessage(target.getName() + " has a total of " + target.getGamePoints() + " game points.");
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendMessage("You must select a player first.");
|
||||
}
|
||||
}
|
||||
else if (command.equals("admin_gamepoints"))
|
||||
{
|
||||
openGamePointsMenu(activeChar);
|
||||
}
|
||||
else if (command.startsWith("admin_set_game_points"))
|
||||
{
|
||||
try
|
||||
{
|
||||
String val = command.substring(22);
|
||||
if (!setGamePoints(activeChar, val))
|
||||
{
|
||||
activeChar.sendMessage("Usage: //set_game_points count");
|
||||
}
|
||||
}
|
||||
catch (StringIndexOutOfBoundsException e)
|
||||
{ // Case of missing parameter
|
||||
activeChar.sendMessage("Usage: //set_game_points count");
|
||||
}
|
||||
}
|
||||
else if (command.startsWith("admin_subtract_game_points"))
|
||||
{
|
||||
try
|
||||
{
|
||||
String val = command.substring(27);
|
||||
if (!subtractGamePoints(activeChar, val))
|
||||
{
|
||||
activeChar.sendMessage("Usage: //subtract_game_points count");
|
||||
}
|
||||
}
|
||||
catch (StringIndexOutOfBoundsException e)
|
||||
{ // Case of missing parameter
|
||||
activeChar.sendMessage("Usage: //subtract_game_points count");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void openGamePointsMenu(L2PcInstance activeChar)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/game_points.htm");
|
||||
activeChar.sendPacket(html);
|
||||
}
|
||||
|
||||
private boolean addGamePoints(L2PcInstance admin, String val)
|
||||
{
|
||||
L2Object target = admin.getTarget();
|
||||
L2PcInstance player = null;
|
||||
if (target.isPlayer())
|
||||
{
|
||||
player = (L2PcInstance) target;
|
||||
}
|
||||
else
|
||||
{
|
||||
admin.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
|
||||
return false;
|
||||
}
|
||||
|
||||
final Long points = Long.valueOf(val);
|
||||
if (points < 1)
|
||||
{
|
||||
admin.sendMessage("Invalid game point count.");
|
||||
return false;
|
||||
}
|
||||
|
||||
final long currentPoints = player.getGamePoints();
|
||||
if (currentPoints < 1)
|
||||
{
|
||||
player.setGamePoints(points);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setGamePoints(currentPoints + points);
|
||||
}
|
||||
|
||||
admin.sendMessage("Added " + points + " game points to " + player.getName() + ".");
|
||||
admin.sendMessage(player.getName() + " has now a total of " + player.getGamePoints() + " game points.");
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean setGamePoints(L2PcInstance admin, String val)
|
||||
{
|
||||
L2Object target = admin.getTarget();
|
||||
L2PcInstance player = null;
|
||||
if (target.isPlayer())
|
||||
{
|
||||
player = (L2PcInstance) target;
|
||||
}
|
||||
else
|
||||
{
|
||||
admin.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
|
||||
return false;
|
||||
}
|
||||
|
||||
final Long points = Long.valueOf(val);
|
||||
if (points < 0)
|
||||
{
|
||||
admin.sendMessage("Invalid game point count.");
|
||||
return false;
|
||||
}
|
||||
|
||||
player.setGamePoints(points);
|
||||
admin.sendMessage(player.getName() + " has now a total of " + points + " game points.");
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean subtractGamePoints(L2PcInstance admin, String val)
|
||||
{
|
||||
L2Object target = admin.getTarget();
|
||||
L2PcInstance player = null;
|
||||
if (target.isPlayer())
|
||||
{
|
||||
player = (L2PcInstance) target;
|
||||
}
|
||||
else
|
||||
{
|
||||
admin.sendPacket(SystemMessageId.THAT_IS_AN_INCORRECT_TARGET);
|
||||
return false;
|
||||
}
|
||||
|
||||
final Long points = Long.valueOf(val);
|
||||
if (points < 1)
|
||||
{
|
||||
admin.sendMessage("Invalid game point count.");
|
||||
return false;
|
||||
}
|
||||
|
||||
final long currentPoints = player.getGamePoints();
|
||||
if (currentPoints <= points)
|
||||
{
|
||||
player.setGamePoints(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setGamePoints(currentPoints - points);
|
||||
}
|
||||
admin.sendMessage(player.getName() + " has now a total of " + player.getGamePoints() + " game points.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getAdminCommandList()
|
||||
{
|
||||
return ADMIN_COMMANDS;
|
||||
}
|
||||
}
|
@ -30,6 +30,7 @@ import com.l2jmobius.gameserver.data.xml.impl.BuyListData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.EnchantItemData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ItemMallData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.TransformData;
|
||||
@ -245,6 +246,12 @@ public class AdminReload implements IAdminCommandHandler
|
||||
AdminData.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded transform data.");
|
||||
break;
|
||||
}
|
||||
case "itemmall":
|
||||
{
|
||||
ItemMallData.getInstance().load();
|
||||
AdminData.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded item mall data.");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
activeChar.sendMessage(RELOAD_USAGE);
|
||||
|
25
L2J_Mobius_CT_2.6_HighFive/dist/game/data/xsd/ItemMall.xsd
vendored
Normal file
25
L2J_Mobius_CT_2.6_HighFive/dist/game/data/xsd/ItemMall.xsd
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="list">
|
||||
<xs:complexType>
|
||||
<xs:sequence maxOccurs="1" minOccurs="1">
|
||||
<xs:element name="product" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:attribute name="id" type="xs:positiveInteger" use="required" />
|
||||
<xs:attribute name="category" use="required">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:positiveInteger">
|
||||
<xs:minInclusive value="1" />
|
||||
<xs:maxInclusive value="8" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="points" type="xs:positiveInteger" use="required" />
|
||||
<xs:attribute name="item" type="xs:positiveInteger" use="required" />
|
||||
<xs:attribute name="count" type="xs:positiveInteger" use="required" />
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
@ -649,6 +649,8 @@ public final class Config
|
||||
public static String[] BOTREPORT_RESETPOINT_HOUR;
|
||||
public static long BOTREPORT_REPORT_DELAY;
|
||||
public static boolean BOTREPORT_ALLOW_REPORTS_FROM_SAME_CLAN_MEMBERS;
|
||||
public static boolean ENABLE_ITEM_MALL;
|
||||
public static int GAME_POINT_ITEM_ID;
|
||||
|
||||
// --------------------------------------------------
|
||||
// FloodProtector Settings
|
||||
@ -2039,6 +2041,8 @@ public final class Config
|
||||
BOTREPORT_RESETPOINT_HOUR = General.getString("BotReportPointsResetHour", "00:00").split(":");
|
||||
BOTREPORT_REPORT_DELAY = General.getInt("BotReportDelay", 30) * 60000;
|
||||
BOTREPORT_ALLOW_REPORTS_FROM_SAME_CLAN_MEMBERS = General.getBoolean("AllowReportsFromSameClanMembers", false);
|
||||
ENABLE_ITEM_MALL = General.getBoolean("EnableItemMall", false);
|
||||
GAME_POINT_ITEM_ID = General.getInt("GamePointItemId", -1);
|
||||
ENABLE_FALLING_DAMAGE = General.getBoolean("EnableFallingDamage", true);
|
||||
|
||||
// Load FloodProtector L2Properties file
|
||||
|
@ -61,6 +61,7 @@ import com.l2jmobius.gameserver.data.xml.impl.HennaData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.HitConditionBonusData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.InitialEquipmentData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.InitialShortcutData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ItemMallData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.KarmaData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
@ -211,6 +212,7 @@ public final class GameServer
|
||||
FishingMonstersData.getInstance();
|
||||
FishingRodsData.getInstance();
|
||||
HennaData.getInstance();
|
||||
ItemMallData.getInstance();
|
||||
|
||||
printSection("Characters");
|
||||
ClassListData.getInstance();
|
||||
|
@ -0,0 +1,108 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.model.ItemMallProduct;
|
||||
import com.l2jmobius.gameserver.model.StatsSet;
|
||||
import com.l2jmobius.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ItemMallData implements IXmlReader
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(ItemMallData.class.getName());
|
||||
private final Map<Integer, ItemMallProduct> _mallList = new HashMap<>();
|
||||
|
||||
protected ItemMallData()
|
||||
{
|
||||
if (!Config.ENABLE_ITEM_MALL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
_mallList.clear();
|
||||
parseDatapackFile("data/ItemMall.xml");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseDocument(Document doc)
|
||||
{
|
||||
NamedNodeMap attrs;
|
||||
Node att;
|
||||
StatsSet set = null;
|
||||
for (Node a = doc.getFirstChild(); a != null; a = a.getNextSibling())
|
||||
{
|
||||
if ("list".equalsIgnoreCase(a.getNodeName()))
|
||||
{
|
||||
for (Node b = a.getFirstChild(); b != null; b = b.getNextSibling())
|
||||
{
|
||||
if ("product".equalsIgnoreCase(b.getNodeName()))
|
||||
{
|
||||
attrs = b.getAttributes();
|
||||
set = new StatsSet();
|
||||
for (int i = 0; i < attrs.getLength(); i++)
|
||||
{
|
||||
att = attrs.item(i);
|
||||
set.set(att.getNodeName(), att.getNodeValue());
|
||||
}
|
||||
final ItemMallProduct product = new ItemMallProduct(set.getInt("id"), set.getInt("category"), set.getInt("points"), set.getInt("item"), set.getInt("count"));
|
||||
_mallList.put(set.getInt("id"), product);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_log.info(getClass().getSimpleName() + ": Loaded " + _mallList.size() + " products.");
|
||||
}
|
||||
|
||||
public Collection<ItemMallProduct> getAllItems()
|
||||
{
|
||||
return _mallList.values();
|
||||
}
|
||||
|
||||
public ItemMallProduct getProduct(int id)
|
||||
{
|
||||
return _mallList.get(id);
|
||||
}
|
||||
|
||||
public static ItemMallData getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final ItemMallData _instance = new ItemMallData();
|
||||
}
|
||||
}
|
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.model;
|
||||
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ItemMallProduct
|
||||
{
|
||||
private final int _productId;
|
||||
private final int _category;
|
||||
private final int _points;
|
||||
private final int _item;
|
||||
private final int _count;
|
||||
|
||||
private final int _weight;
|
||||
private final boolean _tradable;
|
||||
|
||||
public ItemMallProduct(int productId, int category, int points, int item, int count)
|
||||
{
|
||||
_productId = productId;
|
||||
_category = category;
|
||||
_points = points;
|
||||
_item = item;
|
||||
_count = count;
|
||||
|
||||
final L2Item itemTemplate = ItemTable.getInstance().getTemplate(item);
|
||||
if (itemTemplate != null)
|
||||
{
|
||||
_weight = itemTemplate.getWeight();
|
||||
_tradable = itemTemplate.isTradeable();
|
||||
}
|
||||
else
|
||||
{
|
||||
_weight = 0;
|
||||
_tradable = true;
|
||||
}
|
||||
}
|
||||
|
||||
public int getProductId()
|
||||
{
|
||||
return _productId;
|
||||
}
|
||||
|
||||
public int getCategory()
|
||||
{
|
||||
return _category;
|
||||
}
|
||||
|
||||
public int getPrice()
|
||||
{
|
||||
return _points;
|
||||
}
|
||||
|
||||
public int getItemId()
|
||||
{
|
||||
return _item;
|
||||
}
|
||||
|
||||
public int getItemCount()
|
||||
{
|
||||
return _count;
|
||||
}
|
||||
|
||||
public int getItemWeight()
|
||||
{
|
||||
return _weight;
|
||||
}
|
||||
|
||||
public boolean isTradable()
|
||||
{
|
||||
return _tradable;
|
||||
}
|
||||
}
|
@ -921,6 +921,9 @@ public final class L2PcInstance extends L2Playable
|
||||
private boolean _marryrequest = false;
|
||||
private boolean _marryaccepted = false;
|
||||
|
||||
// Item Mall
|
||||
private final static String GAME_POINTS_VAR = "PRIME_POINTS"; // Keep compatibility with later clients.
|
||||
|
||||
// Save responder name for log it
|
||||
private String _lastPetitionGmName = null;
|
||||
|
||||
@ -14332,4 +14335,24 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
return (getSiegeState() > 0) && isInsideZone(ZoneId.SIEGE) && (getSiegeState() == target.getSiegeState()) && (getSiegeSide() == target.getSiegeSide());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the game shop points of the player.
|
||||
*/
|
||||
public long getGamePoints()
|
||||
{
|
||||
return getAccountVariables().getInt(GAME_POINTS_VAR, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets game shop points for current player.
|
||||
* @param points
|
||||
*/
|
||||
public void setGamePoints(long points)
|
||||
{
|
||||
// Immediate store upon change
|
||||
final AccountVariables vars = getAccountVariables();
|
||||
vars.set(GAME_POINTS_VAR, Math.max(points, 0));
|
||||
vars.storeMe();
|
||||
}
|
||||
}
|
@ -1768,27 +1768,27 @@ public final class L2GamePacketHandler implements IPacketHandler<L2GameClient>,
|
||||
}
|
||||
case 0x89:
|
||||
{
|
||||
// RequestBRGamePoint
|
||||
msg = new RequestBrGamePoint();
|
||||
break;
|
||||
}
|
||||
case 0x8A:
|
||||
{
|
||||
// RequestBRProductList
|
||||
msg = new RequestBrProductList();
|
||||
break;
|
||||
}
|
||||
case 0x8B:
|
||||
{
|
||||
// RequestBRProductInfo
|
||||
msg = new RequestBrProductInfo();
|
||||
break;
|
||||
}
|
||||
case 0x8C:
|
||||
{
|
||||
// RequestBRBuyProduct
|
||||
msg = new RequestBrBuyProduct();
|
||||
break;
|
||||
}
|
||||
case 0x8D:
|
||||
{
|
||||
// RequestBRRecentProductList
|
||||
msg = new RequestBrRecentProductList();
|
||||
break;
|
||||
}
|
||||
case 0x8E:
|
||||
|
@ -0,0 +1,135 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.clientpackets;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ItemMallData;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.model.ItemMallProduct;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.items.L2Item;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExBrBuyProduct;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExBrGamePoint;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.StatusUpdate;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestBrBuyProduct extends L2GameClientPacket
|
||||
{
|
||||
private int _productId;
|
||||
private int _count;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_productId = readD();
|
||||
_count = readD();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ((_count > 99) || (_count < 0))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final ItemMallProduct product = ItemMallData.getInstance().getProduct(_productId);
|
||||
if (product == null)
|
||||
{
|
||||
player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_WRONG_PRODUCT));
|
||||
return;
|
||||
}
|
||||
|
||||
final long totalPoints = product.getPrice() * _count;
|
||||
if (totalPoints < 0)
|
||||
{
|
||||
player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_WRONG_PRODUCT));
|
||||
return;
|
||||
}
|
||||
|
||||
final long gamePointSize = Config.GAME_POINT_ITEM_ID == -1 ? player.getGamePoints() : player.getInventory().getInventoryItemCount(Config.GAME_POINT_ITEM_ID, -1);
|
||||
if (totalPoints > gamePointSize)
|
||||
{
|
||||
player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_NOT_ENOUGH_POINTS));
|
||||
return;
|
||||
}
|
||||
|
||||
final L2Item item = ItemTable.getInstance().getTemplate(product.getItemId());
|
||||
if (item == null)
|
||||
{
|
||||
player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_WRONG_PRODUCT));
|
||||
return;
|
||||
}
|
||||
|
||||
final int totalWeight = product.getItemWeight() * product.getItemCount() * _count;
|
||||
int totalCount = 0;
|
||||
totalCount += item.isStackable() ? 1 : product.getItemCount() * _count;
|
||||
if (!player.getInventory().validateCapacity(totalCount) || !player.getInventory().validateWeight(totalWeight))
|
||||
{
|
||||
player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_INVENTORY_FULL));
|
||||
return;
|
||||
}
|
||||
|
||||
// Pay for Item
|
||||
if (Config.GAME_POINT_ITEM_ID == -1)
|
||||
{
|
||||
player.setGamePoints(player.getGamePoints() - totalPoints);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.getInventory().destroyItemByItemId("Buy Product" + _productId, Config.GAME_POINT_ITEM_ID, totalPoints, player, null);
|
||||
}
|
||||
|
||||
// Buy Item
|
||||
player.getInventory().addItem("Buy Product" + _productId, product.getItemId(), product.getItemCount() * _count, player, null);
|
||||
|
||||
final StatusUpdate su = new StatusUpdate(player.getObjectId());
|
||||
su.addAttribute(StatusUpdate.CUR_LOAD, player.getCurrentLoad());
|
||||
player.sendPacket(su);
|
||||
|
||||
player.sendPacket(new ExBrGamePoint(player));
|
||||
player.sendPacket(new ExBrBuyProduct(ExBrBuyProduct.RESULT_OK));
|
||||
player.broadcastUserInfo();
|
||||
|
||||
// Save transaction info at SQL table item_mall_transactions
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("INSERT INTO item_mall_transactions (charId, productId, quantity) values (?,?,?)"))
|
||||
{
|
||||
statement.setLong(1, player.getObjectId());
|
||||
statement.setInt(2, product.getProductId());
|
||||
statement.setLong(3, _count);
|
||||
statement.executeUpdate();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.log(Level.SEVERE, "Could not save Item Mall transaction: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExBrGamePoint;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestBrGamePoint extends L2GameClientPacket
|
||||
{
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
player.sendPacket(new ExBrGamePoint(player));
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExBrProductInfo;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestBrProductInfo extends L2GameClientPacket
|
||||
{
|
||||
private int _productId;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_productId = readD();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new ExBrProductInfo(_productId));
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExBrProductList;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestBrProductList extends L2GameClientPacket
|
||||
{
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new ExBrProductList());
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.ExBrRecentProductList;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestBrRecentProductList extends L2GameClientPacket
|
||||
{
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new ExBrRecentProductList(player));
|
||||
}
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExBrBuyProduct extends L2GameServerPacket
|
||||
{
|
||||
public static final int RESULT_OK = 1; // ok
|
||||
public static final int RESULT_NOT_ENOUGH_POINTS = -1;
|
||||
public static final int RESULT_WRONG_PRODUCT = -2; // also -5
|
||||
public static final int RESULT_INVENTORY_FULL = -4;
|
||||
public static final int RESULT_SALE_PERIOD_ENDED = -7; // also -8
|
||||
public static final int RESULT_WRONG_USER_STATE = -9; // also -11
|
||||
public static final int RESULT_WRONG_PRODUCT_ITEM = -10;
|
||||
|
||||
private final int _result;
|
||||
|
||||
public ExBrBuyProduct(int result)
|
||||
{
|
||||
_result = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xD8);
|
||||
writeD(_result);
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jmobius.Config;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExBrGamePoint extends L2GameServerPacket
|
||||
{
|
||||
private final int _playerObj;
|
||||
private long _points;
|
||||
|
||||
public ExBrGamePoint(L2PcInstance player)
|
||||
{
|
||||
_playerObj = player.getObjectId();
|
||||
|
||||
if (Config.GAME_POINT_ITEM_ID == -1)
|
||||
{
|
||||
_points = player.getGamePoints();
|
||||
}
|
||||
else
|
||||
{
|
||||
_points = player.getInventory().getInventoryItemCount(Config.GAME_POINT_ITEM_ID, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xD5);
|
||||
writeD(_playerObj);
|
||||
writeQ(_points);
|
||||
writeD(0x00);
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ItemMallData;
|
||||
import com.l2jmobius.gameserver.model.ItemMallProduct;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExBrProductInfo extends L2GameServerPacket
|
||||
{
|
||||
private final ItemMallProduct _product;
|
||||
|
||||
public ExBrProductInfo(int id)
|
||||
{
|
||||
_product = ItemMallData.getInstance().getProduct(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
if (_product == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
writeC(0xFE);
|
||||
writeH(0xD7);
|
||||
|
||||
writeD(_product.getProductId()); // product id
|
||||
writeD(_product.getPrice()); // points
|
||||
writeD(1); // components size
|
||||
writeD(_product.getItemId()); // item id
|
||||
writeD(_product.getItemCount()); // quality
|
||||
writeD(_product.getItemWeight()); // weight
|
||||
writeD(_product.isTradable() ? 1 : 0); // 0 - dont drop/trade
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ItemMallData;
|
||||
import com.l2jmobius.gameserver.model.ItemMallProduct;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExBrProductList extends L2GameServerPacket
|
||||
{
|
||||
private final Collection<ItemMallProduct> _itemList = ItemMallData.getInstance().getAllItems();
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xD6);
|
||||
writeD(_itemList.size());
|
||||
|
||||
for (ItemMallProduct product : _itemList)
|
||||
{
|
||||
final int category = product.getCategory();
|
||||
|
||||
writeD(product.getProductId()); // product id
|
||||
writeH(category); // category id
|
||||
writeD(product.getPrice()); // points
|
||||
|
||||
switch (category)
|
||||
{
|
||||
case 6:
|
||||
{
|
||||
writeD(0x01); // event
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
writeD(0x02); // best
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
writeD(0x03); // event & best
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
writeD(0x00); // normal
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
writeD(0x00); // start sale
|
||||
writeD(0x00); // end sale
|
||||
writeC(0x00); // day week
|
||||
writeC(0x00); // start hour
|
||||
writeC(0x00); // start min
|
||||
writeC(0x00); // end hour
|
||||
writeC(0x00); // end min
|
||||
writeD(0x00); // current stock
|
||||
writeD(0x00); // max stock
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import com.l2jmobius.commons.database.DatabaseFactory;
|
||||
import com.l2jmobius.gameserver.data.xml.impl.ItemMallData;
|
||||
import com.l2jmobius.gameserver.model.ItemMallProduct;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExBrRecentProductList extends L2GameServerPacket
|
||||
{
|
||||
private final List<ItemMallProduct> _itemList = new ArrayList<>();
|
||||
|
||||
public ExBrRecentProductList(L2PcInstance player)
|
||||
{
|
||||
final int playerObj = player.getObjectId();
|
||||
|
||||
try (Connection con = DatabaseFactory.getInstance().getConnection();
|
||||
PreparedStatement statement = con.prepareStatement("SELECT productId FROM item_mall_transactions WHERE charId=? ORDER BY transactionTime DESC"))
|
||||
{
|
||||
statement.setInt(1, playerObj);
|
||||
try (ResultSet rset = statement.executeQuery())
|
||||
{
|
||||
while (rset.next())
|
||||
{
|
||||
final ItemMallProduct product = ItemMallData.getInstance().getProduct(rset.getInt("productId"));
|
||||
if ((product != null) && !_itemList.contains(product))
|
||||
{
|
||||
_itemList.add(product);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.log(Level.SEVERE, "Could not restore Item Mall transaction: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void writeImpl()
|
||||
{
|
||||
if ((_itemList == null) || _itemList.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
writeC(0xFE);
|
||||
writeH(0xDC);
|
||||
writeD(_itemList.size());
|
||||
|
||||
for (ItemMallProduct product : _itemList)
|
||||
{
|
||||
writeD(product.getProductId());
|
||||
writeH(product.getCategory());
|
||||
writeD(product.getPrice());
|
||||
writeD(0x00); // category
|
||||
|
||||
writeD(0x00); // start sale
|
||||
writeD(0x00); // end sale
|
||||
writeC(0x00); // day week
|
||||
writeC(0x00); // start hour
|
||||
writeC(0x00); // start min
|
||||
writeC(0x00); // end hour
|
||||
writeC(0x00); // end min
|
||||
writeD(0x00); // current stock
|
||||
writeD(0x00); // max stock
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user