Player Commendation System (PC Bang).
This commit is contained in:
parent
007760a8cb
commit
d4edb0e701
30
trunk/dist/game/config/Custom.properties
vendored
30
trunk/dist/game/config/Custom.properties
vendored
@ -838,3 +838,33 @@ BTZChanceSupportRewards = 50
|
||||
# Example: 30
|
||||
# 0 for no delay (disable)
|
||||
BTZDelay = 10
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Player Commendation Points (PC Bang)
|
||||
# ---------------------------------------------------------------------------
|
||||
# PC BANG POINTS ID = -100
|
||||
|
||||
# PC Bang Enabled
|
||||
Enabled = True
|
||||
|
||||
# Max points that player may have
|
||||
# Limited by int limit
|
||||
MaxPcBangPoints = 200000
|
||||
|
||||
# Use random in rewarding with points
|
||||
# If enabled points will be random from points/2 to points
|
||||
AcquisitionPointsRandom = False
|
||||
|
||||
# Creates a chance to aquire double point
|
||||
DoublingAcquisitionPoints = True
|
||||
|
||||
# Double points chance
|
||||
# If DoublingAcquisitionPoints=True
|
||||
DoublingAcquisitionPointsChance = 1
|
||||
|
||||
# PC Bang point rate
|
||||
# e.g. with 1.0 it's 10000 exp = 1 PC Bang point
|
||||
# 2.0 - 10000 exp = 2 PC Bang points
|
||||
# 0.5 - 5000 exp = 1 PC Bang point
|
||||
AcquisitionPointsRate = 1.0
|
||||
|
8
trunk/dist/game/data/html/pccafe.htm
vendored
Normal file
8
trunk/dist/game/data/html/pccafe.htm
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
<html><body>Player Commendation Points:<br>
|
||||
You can use PC points to buy items.<br>
|
||||
It is possible to buy several <font color="LEVEL">General Items</font>, like hair accessories or even <font color="LEVEL">Weapons and Enchant Weapon Scrolls</font> up to <font color="LEVEL">A-Grade</font>.<br>
|
||||
Take a look on the current rewards.<br>
|
||||
<font color="LEVEL">
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h pccafe_buy 900001">Buy General Items</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h pccafe_buy 900002">Buy Weapons and Enchant Weapon Scrolls</Button>
|
||||
</body></html>
|
5
trunk/dist/tools/sql/game/characters.sql
vendored
5
trunk/dist/tools/sql/game/characters.sql
vendored
@ -53,14 +53,13 @@ CREATE TABLE IF NOT EXISTS `characters` (
|
||||
`death_penalty_level` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`bookmarkslot` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
`vitality_points` int(10) NOT NULL DEFAULT '140000',
|
||||
`pccafe_points` int(6) DEFAULT NULL,
|
||||
`createDate` date NOT NULL DEFAULT '0000-00-00',
|
||||
`language` VARCHAR(2) DEFAULT NULL,
|
||||
`faction` TINYINT UNSIGNED NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`charId`),
|
||||
KEY `account_name` (`account_name`),
|
||||
KEY `char_name` (`char_name`),
|
||||
KEY `clanid` (`clanid`),
|
||||
KEY `online` (`online`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Faction System
|
||||
ALTER TABLE `characters` ADD `faction` TINYINT UNSIGNED NOT NULL DEFAULT 0;
|
@ -865,6 +865,12 @@ public final class Config
|
||||
public static boolean BTZ_REMOVE_BUFFS;
|
||||
public static boolean BTZ_REMOVE_PETS;
|
||||
public static List<int[]> BTZ_REWARDS;
|
||||
public static boolean PC_BANG_ENABLED;
|
||||
public static int MAX_PC_BANG_POINTS;
|
||||
public static boolean ENABLE_DOUBLE_PC_BANG_POINTS;
|
||||
public static int DOUBLE_PC_BANG_POINTS_CHANCE;
|
||||
public static double PC_BANG_POINT_RATE;
|
||||
public static boolean RANDOM_PC_BANG_POINT;
|
||||
|
||||
// --------------------------------------------------
|
||||
// NPC Settings
|
||||
@ -2750,6 +2756,24 @@ public final class Config
|
||||
}
|
||||
}
|
||||
|
||||
PC_BANG_ENABLED = CustomSettings.getBoolean("Enabled", false);
|
||||
MAX_PC_BANG_POINTS = CustomSettings.getInt("MaxPcBangPoints", 200000);
|
||||
if (MAX_PC_BANG_POINTS < 0)
|
||||
{
|
||||
MAX_PC_BANG_POINTS = 0;
|
||||
}
|
||||
ENABLE_DOUBLE_PC_BANG_POINTS = CustomSettings.getBoolean("DoublingAcquisitionPoints", false);
|
||||
DOUBLE_PC_BANG_POINTS_CHANCE = CustomSettings.getInt("DoublingAcquisitionPointsChance", 1);
|
||||
if ((DOUBLE_PC_BANG_POINTS_CHANCE < 0) || (DOUBLE_PC_BANG_POINTS_CHANCE > 100))
|
||||
{
|
||||
DOUBLE_PC_BANG_POINTS_CHANCE = 1;
|
||||
}
|
||||
PC_BANG_POINT_RATE = CustomSettings.getDouble("AcquisitionPointsRate", 1.0);
|
||||
if (PC_BANG_POINT_RATE < 0)
|
||||
{
|
||||
PC_BANG_POINT_RATE = 1;
|
||||
}
|
||||
|
||||
// Load PvP L2Properties file (if exists)
|
||||
final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE);
|
||||
|
||||
|
@ -124,6 +124,7 @@ import com.l2jserver.gameserver.instancemanager.MailManager;
|
||||
import com.l2jserver.gameserver.instancemanager.MapRegionManager;
|
||||
import com.l2jserver.gameserver.instancemanager.MentorManager;
|
||||
import com.l2jserver.gameserver.instancemanager.MercTicketManager;
|
||||
import com.l2jserver.gameserver.instancemanager.PcCafePointsManager;
|
||||
import com.l2jserver.gameserver.instancemanager.PetitionManager;
|
||||
import com.l2jserver.gameserver.instancemanager.PremiumManager;
|
||||
import com.l2jserver.gameserver.instancemanager.PunishmentManager;
|
||||
@ -355,6 +356,7 @@ public class GameServer
|
||||
MerchantPriceConfigTable.getInstance().updateReferences();
|
||||
CastleManorManager.getInstance();
|
||||
MercTicketManager.getInstance();
|
||||
PcCafePointsManager.getInstance();
|
||||
QuestManager.getInstance().report();
|
||||
|
||||
if (Config.SAVE_DROPPED_ITEM)
|
||||
|
@ -40,6 +40,7 @@ import com.l2jserver.gameserver.model.multisell.Ingredient;
|
||||
import com.l2jserver.gameserver.model.multisell.ListContainer;
|
||||
import com.l2jserver.gameserver.model.multisell.PreparedListContainer;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExPCCafePointInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.MultiSellList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.UserInfo;
|
||||
@ -281,6 +282,13 @@ public final class MultisellData implements IXmlReader
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case PC_BANG_POINTS:
|
||||
if (player.getPcBangPoints() < amount)
|
||||
{
|
||||
player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_SHORT_OF_PC_POINTS));
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
case CLAN_REPUTATION:
|
||||
if (player.getClan() == null)
|
||||
{
|
||||
@ -313,6 +321,14 @@ public final class MultisellData implements IXmlReader
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case PC_BANG_POINTS: // PcBang points
|
||||
final int cost = player.getPcBangPoints() - (int) (amount);
|
||||
player.setPcBangPoints(cost);
|
||||
SystemMessage smsgpc = SystemMessage.getSystemMessage(SystemMessageId.YOU_ARE_USING_S1_POINT);
|
||||
smsgpc.addLong((int) amount);
|
||||
player.sendPacket(smsgpc);
|
||||
player.sendPacket(new ExPCCafePointInfo(player.getPcBangPoints(), (int) amount, 1));
|
||||
return true;
|
||||
case CLAN_REPUTATION:
|
||||
player.getClan().takeReputationScore((int) amount, true);
|
||||
SystemMessage smsg = SystemMessage.getSystemMessage(SystemMessageId.S1_POINT_S_HAVE_BEEN_DEDUCTED_FROM_THE_CLAN_S_REPUTATION);
|
||||
@ -375,6 +391,7 @@ public final class MultisellData implements IXmlReader
|
||||
{
|
||||
switch (ing.getItemId())
|
||||
{
|
||||
case PC_BANG_POINTS:
|
||||
case CLAN_REPUTATION:
|
||||
case FAME:
|
||||
return true;
|
||||
|
@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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.l2jserver.gameserver.instancemanager;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.zone.ZoneId;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExPCCafePointInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.util.Rnd;
|
||||
|
||||
public class PcCafePointsManager
|
||||
{
|
||||
private static PcCafePointsManager _instance;
|
||||
|
||||
public static PcCafePointsManager getInstance()
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = new PcCafePointsManager();
|
||||
}
|
||||
return _instance;
|
||||
}
|
||||
|
||||
public PcCafePointsManager()
|
||||
{
|
||||
}
|
||||
|
||||
public void givePcCafePoint(final L2PcInstance player, final long givedexp)
|
||||
{
|
||||
if (!Config.PC_BANG_ENABLED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.isInsideZone(ZoneId.PEACE) || player.isInsideZone(ZoneId.PVP) || player.isInsideZone(ZoneId.SIEGE) || (player.isOnlineInt() == 0) || player.isJailed())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.getPcBangPoints() >= Config.MAX_PC_BANG_POINTS)
|
||||
{
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_EARNED_THE_MAXIMUM_NUMBER_OF_PC_POINTS);
|
||||
player.sendPacket(sm);
|
||||
return;
|
||||
}
|
||||
int _points = (int) (givedexp * 0.0001 * Config.PC_BANG_POINT_RATE);
|
||||
|
||||
// TODO: Mage class balance?
|
||||
// if ((player.getActiveClass() == ClassId.ARCHMAGE.getId()) || (player.getActiveClass() == ClassId.SOULTAKER.getId()) || (player.getActiveClass() == ClassId.STORM_SCREAMER.getId()) || (player.getActiveClass() == ClassId.MYSTIC_MUSE.getId()))
|
||||
// {
|
||||
// _points /= 2;
|
||||
// }
|
||||
|
||||
if (Config.RANDOM_PC_BANG_POINT)
|
||||
{
|
||||
_points = Rnd.get(_points / 2, _points);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
boolean doublepoint = false;
|
||||
SystemMessage sm = null;
|
||||
if (_points > 0)
|
||||
{
|
||||
if (Config.ENABLE_DOUBLE_PC_BANG_POINTS && (Rnd.get(100) < Config.DOUBLE_PC_BANG_POINTS_CHANCE))
|
||||
{
|
||||
_points *= 2;
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.DOUBLE_POINTS_YOU_EARNED_S1_PC_POINT_S);
|
||||
doublepoint = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_EARNED_S1_PC_POINT_S2);
|
||||
}
|
||||
if ((player.getPcBangPoints() + _points) > Config.MAX_PC_BANG_POINTS)
|
||||
{
|
||||
_points = Config.MAX_PC_BANG_POINTS - player.getPcBangPoints();
|
||||
}
|
||||
sm.addLong(_points);
|
||||
player.sendPacket(sm);
|
||||
player.setPcBangPoints(player.getPcBangPoints() + _points);
|
||||
player.sendPacket(new ExPCCafePointInfo(player.getPcBangPoints(), _points, 1));
|
||||
}
|
||||
}
|
||||
}
|
@ -38,6 +38,7 @@ import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.datatables.ItemTable;
|
||||
import com.l2jserver.gameserver.enums.PartyDistributionType;
|
||||
import com.l2jserver.gameserver.instancemanager.DuelManager;
|
||||
import com.l2jserver.gameserver.instancemanager.PcCafePointsManager;
|
||||
import com.l2jserver.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Summon;
|
||||
@ -857,6 +858,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
if (addexp > 0)
|
||||
{
|
||||
member.updateVitalityPoints(vitalityPoints, true, false);
|
||||
PcCafePointsManager.getInstance().givePcCafePoint((member), addexp);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -41,6 +41,7 @@ import com.l2jserver.gameserver.datatables.EventDroplist.DateDrop;
|
||||
import com.l2jserver.gameserver.datatables.ItemTable;
|
||||
import com.l2jserver.gameserver.enums.InstanceType;
|
||||
import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import com.l2jserver.gameserver.instancemanager.PcCafePointsManager;
|
||||
import com.l2jserver.gameserver.instancemanager.WalkingManager;
|
||||
import com.l2jserver.gameserver.model.AbsorberInfo;
|
||||
import com.l2jserver.gameserver.model.AggroInfo;
|
||||
@ -527,6 +528,7 @@ public class L2Attackable extends L2Npc
|
||||
if (addexp > 0)
|
||||
{
|
||||
attacker.updateVitalityPoints(getVitalityPoints(damage), true, false);
|
||||
PcCafePointsManager.getInstance().givePcCafePoint((attacker), addexp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
// Character Character SQL String Definitions:
|
||||
private static final String INSERT_CHARACTER = "INSERT INTO characters (account_name,charId,char_name,level,maxHp,curHp,maxCp,curCp,maxMp,curMp,face,hairStyle,hairColor,sex,exp,sp,karma,fame,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,accesslevel,online,isin7sdungeon,clan_privs,wantspeace,base_class,newbie,nobless,power_grade,createDate) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||
private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,language=?,faction=? WHERE charId=?";
|
||||
private static final String UPDATE_CHARACTER = "UPDATE characters SET level=?,maxHp=?,curHp=?,maxCp=?,curCp=?,maxMp=?,curMp=?,face=?,hairStyle=?,hairColor=?,sex=?,heading=?,x=?,y=?,z=?,exp=?,expBeforeDeath=?,sp=?,karma=?,fame=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,accesslevel=?,online=?,isin7sdungeon=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,newbie=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,death_penalty_level=?,bookmarkslot=?,vitality_points=?,pccafe_points=?,language=?,faction=? WHERE charId=?";
|
||||
private static final String RESTORE_CHARACTER = "SELECT * FROM characters WHERE charId=?";
|
||||
|
||||
// Character Premium System String Definitions:
|
||||
@ -405,6 +405,8 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public static final int REQUEST_TIMEOUT = 15;
|
||||
|
||||
private int _pcBangPoints = 0;
|
||||
|
||||
public static final String WORLD_CHAT_VARIABLE_NAME = "WORLD_CHAT_POINTS";
|
||||
|
||||
private final List<IEventListener> _eventListeners = new FastList<IEventListener>().shared();
|
||||
@ -7223,6 +7225,8 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
player._vitalityPoints = rset.getInt("vitality_points");
|
||||
|
||||
player.setPcBangPoints(rset.getInt("pccafe_points"));
|
||||
|
||||
// character creation Time
|
||||
player.getCreateDate().setTime(rset.getDate("createDate"));
|
||||
|
||||
@ -7685,7 +7689,8 @@ public final class L2PcInstance extends L2Playable
|
||||
statement.setLong(46, 0); // unset
|
||||
statement.setInt(47, getBookMarkSlot());
|
||||
statement.setInt(48, _vitalityPoints); // unset
|
||||
statement.setString(49, getLang());
|
||||
statement.setInt(49, getPcBangPoints());
|
||||
statement.setString(50, getLang());
|
||||
|
||||
int factionId = 0;
|
||||
if (isGood())
|
||||
@ -7696,10 +7701,9 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
factionId = 2;
|
||||
}
|
||||
statement.setInt(50, factionId);
|
||||
|
||||
statement.setInt(51, getObjectId());
|
||||
statement.setInt(51, factionId);
|
||||
|
||||
statement.setInt(52, getObjectId());
|
||||
statement.execute();
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -14163,6 +14167,24 @@ public final class L2PcInstance extends L2Playable
|
||||
_offlineShopStart = time;
|
||||
}
|
||||
|
||||
public int getPcBangPoints()
|
||||
{
|
||||
return _pcBangPoints;
|
||||
|
||||
}
|
||||
|
||||
public void setPcBangPoints(final int i)
|
||||
{
|
||||
if (i < 200000)
|
||||
{
|
||||
_pcBangPoints = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
_pcBangPoints = 200000;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove player from BossZones (used on char logout/exit)
|
||||
*/
|
||||
|
@ -27,9 +27,11 @@ import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.L2DatabaseFactory;
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
import com.l2jserver.gameserver.enums.QuestType;
|
||||
import com.l2jserver.gameserver.instancemanager.PcCafePointsManager;
|
||||
import com.l2jserver.gameserver.instancemanager.QuestManager;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
@ -827,6 +829,7 @@ public final class QuestState
|
||||
public void addExpAndSp(int exp, int sp)
|
||||
{
|
||||
AbstractScript.addExpAndSp(_player, exp, sp);
|
||||
PcCafePointsManager.getInstance().givePcCafePoint(getPlayer(), (long) (exp * Config.RATE_QUEST_REWARD_XP));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1601,7 +1601,7 @@ public final class L2GamePacketHandler implements IPacketHandler<L2GameClient>,
|
||||
msg = new RequestAbilityWndClose();
|
||||
break;
|
||||
case 0xF0:
|
||||
// msg = ExPCCafeRequestOpenWindowWithoutNPC();
|
||||
msg = new ExPCCafeRequestOpenWindowWithoutNPC();
|
||||
break;
|
||||
case 0xF2:
|
||||
// msg = new RequestLuckyGamePlay();
|
||||
|
@ -70,6 +70,7 @@ import com.l2jserver.gameserver.network.serverpackets.ExGetBookMarkInfoPacket;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExNewSkillToLearnByLevelUp;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExNoticePostArrived;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExNotifyPremiumItem;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExPCCafePointInfo;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExPledgeCount;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExPledgeWaitingListAlarm;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage;
|
||||
@ -438,6 +439,18 @@ public class EnterWorld extends L2GameClientPacket
|
||||
CursedWeaponsManager.getInstance().getCursedWeapon(activeChar.getCursedWeaponEquippedId()).cursedOnLogin();
|
||||
}
|
||||
|
||||
if (Config.PC_BANG_ENABLED)
|
||||
{
|
||||
if (activeChar.getPcBangPoints() > 0)
|
||||
{
|
||||
activeChar.sendPacket(new ExPCCafePointInfo(activeChar.getPcBangPoints(), 0, 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.sendPacket(new ExPCCafePointInfo());
|
||||
}
|
||||
}
|
||||
|
||||
activeChar.updateEffectIcons();
|
||||
|
||||
// Expand Skill
|
||||
|
@ -0,0 +1,36 @@
|
||||
package com.l2jserver.gameserver.network.clientpackets;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
|
||||
public class ExPCCafeRequestOpenWindowWithoutNPC extends L2GameClientPacket
|
||||
{
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance _activeChar = getClient().getActiveChar();
|
||||
if ((_activeChar != null) && Config.PC_BANG_ENABLED)
|
||||
{
|
||||
getHtmlPage(_activeChar);
|
||||
}
|
||||
}
|
||||
|
||||
public void getHtmlPage(L2PcInstance player)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage();
|
||||
html.setFile(player.getHtmlPrefix(), "data/html/pccafe.htm");
|
||||
player.sendPacket(html);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType()
|
||||
{
|
||||
return getClass().getName();
|
||||
}
|
||||
}
|
@ -24,6 +24,7 @@ import java.util.logging.Level;
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.ai.CtrlIntention;
|
||||
import com.l2jserver.gameserver.data.xml.impl.AdminData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.MultisellData;
|
||||
import com.l2jserver.gameserver.enums.InstanceType;
|
||||
import com.l2jserver.gameserver.enums.PlayerAction;
|
||||
import com.l2jserver.gameserver.handler.AdminCommandHandler;
|
||||
@ -69,7 +70,8 @@ public final class RequestBypassToServer extends L2GameClientPacket
|
||||
"_olympiad?command",
|
||||
"menu_select",
|
||||
"manor_menu_select",
|
||||
"showAuction"
|
||||
"showAuction",
|
||||
"pccafe"
|
||||
};
|
||||
|
||||
// S
|
||||
@ -289,13 +291,23 @@ public final class RequestBypassToServer extends L2GameClientPacket
|
||||
}
|
||||
else if (_command.equals("showAuction"))
|
||||
{
|
||||
L2PcInstance player = getClient().getActiveChar();
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
player.sendPacket(new ExShowCommission());
|
||||
}
|
||||
else if (_command.startsWith("pccafe"))
|
||||
{
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if ((player == null) || !Config.PC_BANG_ENABLED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
final int multisellId = Integer.parseInt(_command.substring(10).trim());
|
||||
MultisellData.getInstance().separateAndSend(multisellId, activeChar, null, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
final IBypassHandler handler = BypassHandler.getInstance().getHandler(_command);
|
||||
|
Loading…
Reference in New Issue
Block a user