PC Cafe system.
This commit is contained in:
@ -36,6 +36,7 @@ import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.datatables.ItemTable;
|
||||
import com.l2jmobius.gameserver.enums.PartyDistributionType;
|
||||
import com.l2jmobius.gameserver.instancemanager.DuelManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.PcCafePointsManager;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Attackable;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Character;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Summon;
|
||||
@ -881,6 +882,7 @@ public class L2Party extends AbstractPlayerGroup
|
||||
clan.addHuntingPoints(member, target, finalExp);
|
||||
}
|
||||
member.updateVitalityPoints(target.getVitalityPoints(member.getLevel(), addexp, target.isRaid()), true, false);
|
||||
PcCafePointsManager.getInstance().givePcCafePoint(member, addexp);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -48,6 +48,7 @@ import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.enums.InstanceType;
|
||||
import com.l2jmobius.gameserver.enums.Team;
|
||||
import com.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.PcCafePointsManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.WalkingManager;
|
||||
import com.l2jmobius.gameserver.model.AggroInfo;
|
||||
import com.l2jmobius.gameserver.model.DamageDoneInfo;
|
||||
@ -508,8 +509,8 @@ public class L2Attackable extends L2Npc
|
||||
}
|
||||
clan.addHuntingPoints(attacker, this, finalExp);
|
||||
}
|
||||
|
||||
attacker.updateVitalityPoints(getVitalityPoints(attacker.getLevel(), addexp, isRaid()), true, false);
|
||||
PcCafePointsManager.getInstance().givePcCafePoint(attacker, addexp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -364,7 +364,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,reputation,fame,raidbossPoints,pvpkills,pkkills,clanid,race,classid,deletetime,cancraft,title,title_color,online,clan_privs,wantspeace,base_class,nobless,power_grade,vitality_points,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=?,reputation=?,fame=?,raidbossPoints=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,online=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,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=?,reputation=?,fame=?,raidbossPoints=?,pvpkills=?,pkkills=?,clanid=?,race=?,classid=?,deletetime=?,title=?,title_color=?,online=?,clan_privs=?,wantspeace=?,base_class=?,onlinetime=?,nobless=?,power_grade=?,subpledge=?,lvl_joined_academy=?,apprentice=?,sponsor=?,clan_join_expiry_time=?,clan_create_expiry_time=?,char_name=?,bookmarkslot=?,vitality_points=?,language=?,faction=?,pccafe_points=? WHERE charId=?";
|
||||
private static final String UPDATE_CHARACTER_ACCESS = "UPDATE characters SET accesslevel = ? WHERE charId = ?";
|
||||
private static final String RESTORE_CHARACTER = "SELECT * FROM characters WHERE charId=?";
|
||||
|
||||
@ -405,6 +405,8 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public static final int REQUEST_TIMEOUT = 15;
|
||||
|
||||
private int _pcCafePoints = 0;
|
||||
|
||||
private L2GameClient _client;
|
||||
|
||||
private final String _accountName;
|
||||
@ -6555,6 +6557,8 @@ public final class L2PcInstance extends L2Playable
|
||||
player.setClanCreateExpiryTime(0);
|
||||
}
|
||||
|
||||
player.setPcCafePoints(rset.getInt("pccafe_points"));
|
||||
|
||||
final int clanId = rset.getInt("clanid");
|
||||
player.setPowerGrade(rset.getInt("power_grade"));
|
||||
player.getStat().setVitalityPoints(rset.getInt("vitality_points"));
|
||||
@ -7139,8 +7143,8 @@ public final class L2PcInstance extends L2Playable
|
||||
factionId = 2;
|
||||
}
|
||||
statement.setInt(47, factionId);
|
||||
|
||||
statement.setInt(48, getObjectId());
|
||||
statement.setInt(48, getPcCafePoints());
|
||||
statement.setInt(49, getObjectId());
|
||||
|
||||
statement.execute();
|
||||
}
|
||||
@ -12537,6 +12541,16 @@ public final class L2PcInstance extends L2Playable
|
||||
_offlineShopStart = time;
|
||||
}
|
||||
|
||||
public int getPcCafePoints()
|
||||
{
|
||||
return _pcCafePoints;
|
||||
}
|
||||
|
||||
public void setPcCafePoints(int count)
|
||||
{
|
||||
_pcCafePoints = count < 200000 ? count : 200000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check all player skills for skill level. If player level is lower than skill learn level - 9, skill level is decreased to next possible level.
|
||||
*/
|
||||
@ -13868,4 +13882,5 @@ public final class L2PcInstance extends L2Playable
|
||||
addStatusUpdateValue(StatusUpdateType.MAX_CP);
|
||||
addStatusUpdateValue(StatusUpdateType.CUR_CP);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -300,7 +300,7 @@ public final class L2TeleporterInstance extends L2Npc
|
||||
}
|
||||
switch (itemId)
|
||||
{
|
||||
case MultisellData.PC_BANG_POINTS:
|
||||
case MultisellData.PC_CAFE_POINTS:
|
||||
{
|
||||
return "Player Commendation Points";
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ import com.l2jmobius.gameserver.enums.QuestSound;
|
||||
import com.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.PcCafePointsManager;
|
||||
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
|
||||
import com.l2jmobius.gameserver.model.L2Object;
|
||||
import com.l2jmobius.gameserver.model.L2Spawn;
|
||||
@ -2801,6 +2802,7 @@ public abstract class AbstractScript extends ManagedScript implements IEventTime
|
||||
public static void addExpAndSp(L2PcInstance player, long exp, int sp)
|
||||
{
|
||||
player.addExpAndSp((long) player.getStat().getValue(Stats.EXPSP_RATE, (exp * Config.RATE_QUEST_REWARD_XP)), (int) player.getStat().getValue(Stats.EXPSP_RATE, (sp * Config.RATE_QUEST_REWARD_SP)));
|
||||
PcCafePointsManager.getInstance().givePcCafePoint(player, (long) (exp * Config.RATE_QUEST_REWARD_XP));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user