Сообщений: 68
Тем: 2
Зарегистрирован: May 2014
Репутация:
-514
silvermain Написал:Amaranthe,
вот пакет отвечающий за отображение персонажей в Лобби!
(копия для l2jserver)
CharacterSelectionInfo
PHP код: <?php
protected final void writeImpl()
{
writeC(0x09);
int size = (_characterPackages.length);
writeD(size);
writeD(Config.MAX_CHARACTERS_NUMBER_PER_ACCOUNT);
writeC(0x00);
writeC(0x01);
writeC(0x02);
writeD(0x00);
long lastAccess = -1L;
if (_activeId == -1)
{
for (int i = 0; i < size; i++)
{
if (lastAccess < _characterPackages[i].getLastAccess())
{
lastAccess = _characterPackages[i].getLastAccess();
_activeId = i++;
}
}
}
for (int i = 0; i < size; i++)
{
CharSelectInfoPackage charInfoPackage = _characterPackages[i];
writeS(charInfoPackage.getName());
writeD(charInfoPackage.getObjectId());
writeS(_loginName);
writeD(_sessionId);
writeD(charInfoPackage.getClanId());
writeD(0x00); // ??
writeD(charInfoPackage.getSex());
writeD(charInfoPackage.getRace());
if (charInfoPackage.getClassId() == charInfoPackage.getBaseClassId())
{
writeD(charInfoPackage.getClassId());
}
else
{
writeD(charInfoPackage.getBaseClassId());
}
writeD(0x01); // active ??
writeD(charInfoPackage.getX());
writeD(charInfoPackage.getY());
writeD(charInfoPackage.getZ());
writeF(charInfoPackage.getCurrentHp());
writeF(charInfoPackage.getCurrentMp());
writeD(charInfoPackage.getSp());
writeQ(charInfoPackage.getExp());
writeF((float) (charInfoPackage.getExp() - ExperienceTable.getInstance().getExpForLevel(charInfoPackage.getLevel())) / (ExperienceTable.getInstance().getExpForLevel(charInfoPackage.getLevel() + 1) - ExperienceTable.getInstance().getExpForLevel(charInfoPackage.getLevel()))); // High Five
// exp %
writeD(charInfoPackage.getLevel());
writeD(charInfoPackage.getKarma());
writeD(charInfoPackage.getPkKills());
writeD(charInfoPackage.getPvPKills());
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
for (int slot : getPaperdollOrder())
{
writeD(charInfoPackage.getPaperdollItemId(slot));
}
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(charInfoPackage.getHairStyle());
writeD(charInfoPackage.getHairColor());
writeD(charInfoPackage.getFace());
writeF(charInfoPackage.getMaxHp()); // hp max
writeF(charInfoPackage.getMaxMp()); // mp max
long deleteTime = charInfoPackage.getDeleteTimer();
int deletedays = 0;
if (deleteTime > 0)
{
deletedays = (int) ((deleteTime - System.currentTimeMillis()) / 1000);
}
writeD(charInfoPackage.getAccessLevel() <= 100 ? -1 : deletedays); // days left before
// delete .. if != 0
// then char is inactive
writeD(charInfoPackage.getClassId());
writeD(i == _activeId ? 0x01 : 0x00); // c3 auto-select char
writeC(charInfoPackage.getEnchantEffect() > 127 ? 127 : charInfoPackage.getEnchantEffect());
writeD(0x00); //Augmentation ID
int weaponId = charInfoPackage.getPaperdollItemId(7);
if (weaponId == 8190)
writeD(301);
else if (weaponId == 8689)
writeD(302);
else
writeD(0x00);
// Freya by Vistall:
writeD(0x00); // npdid - 16024 Tame Tiny Baby Kookaburra A9E89C
writeD(0x00); // level
writeD(0x00); // ?
writeD(0x00); // food? - 1200
writeF(0x00); // max Hp
writeF(0x00); // cur Hp
// High Five by Vistall:
writeD(charInfoPackage.getVitalityPoints()); // H5 Vitality
writeD(200);
writeD(5);
writeD(0);
writeC(0);
writeC(0);
}
}
Не помогло Оо
Сообщений: 102
Тем: 0
Зарегистрирован: Dec 2012
Репутация:
139
Amaranthe,
скрины покажи что у тебя да и как
Сообщений: 68
Тем: 2
Зарегистрирован: May 2014
Репутация:
-514
06-10-2014, 09:16 PM
(Сообщение последний раз редактировалось: 06-10-2014, 10:53 PM Amaranthe.)
silvermain Написал:Amaranthe,
скрины покажи что у тебя да и как в скайп заявку кинул
Добавлено через 6 минут
PHP код: <?php
public class CharacterSelectionInfo extends L2GameServerPacket {
// dc cd SdSddddddddddffdQfddddddddddddddddddddddddddddddddddddddddffdddchhdddddffdd
private static final Logger _log = LoggerFactory.getLogger(CharacterSelectionInfo.class);
private String _loginName;
private int _sessionId;
private CharSelectionInfo charSelectionInfo;
public CharacterSelectionInfo(String loginName, int sessionId) {
_sessionId = sessionId;
_loginName = loginName;
charSelectionInfo = loadCharacterSelectInfo(loginName);
}
public CharSelectionInfo getCharInfo() {
return charSelectionInfo;
}
@Override
protected final void writeImpl() {
int size = charSelectionInfo.size();
writeC(0x09);
writeD(size);
writeD(0x07);
writeC(0x00);
writeC(0x01);
writeC(0x02);// хз у гв всегда 2 поступало
writeD(0x00);
long lastAccess = -1L;
int lastUsed = -1;
for (CharSelectInfoPackage info : charSelectionInfo) {
if (lastAccess < info.getLastAccess()) {
lastAccess = info.getLastAccess();
lastUsed++;
}
}
int i = 0;
for (CharSelectInfoPackage charInfoPackage : charSelectionInfo) {
writeS(charInfoPackage.getName());
writeD(charInfoPackage.getCharId()); // ?
writeS(_loginName);
writeD(_sessionId);
writeD(charInfoPackage.getClanId());
writeD(0x00); // ??
writeD(charInfoPackage.getSex());
writeD(charInfoPackage.getRace());
writeD(charInfoPackage.getBaseClassId());
writeD(0x01); // active ??
writeD(charInfoPackage.getX());
writeD(charInfoPackage.getY());
writeD(charInfoPackage.getZ());
writeF(charInfoPackage.getCurrentHp());
writeF(charInfoPackage.getCurrentMp());
writeD(charInfoPackage.getSp());
writeQ(charInfoPackage.getExp());
int lvl = charInfoPackage.getLevel();
writeF(Experience.getExpPercent(lvl, charInfoPackage.getExp()));
writeD(lvl);
writeD(charInfoPackage.getKarma());
writeD(charInfoPackage.getPk());
writeD(charInfoPackage.getPvP());
// 468 - ? (7)
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
for (int PAPERDOLL_ID : Inventory.PAPERDOLL_ORDER)
writeD(charInfoPackage.getPaperdollItemId(PAPERDOLL_ID));
// New Protocol 411
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
// End Protocol 411
writeD(charInfoPackage.getHairStyle());
writeD(charInfoPackage.getHairColor());
writeD(charInfoPackage.getFace());
writeF(charInfoPackage.getMaxHp()); // hp max
writeF(charInfoPackage.getMaxMp()); // mp max
writeD(charInfoPackage.getAccessLevel() > -100 ? charInfoPackage.getDeleteTimer() : -1);
writeD(charInfoPackage.getClassId());
writeD(i == lastUsed ? 1 : 0);
writeC(Math.min(charInfoPackage.getPaperdollEnchantEffect(Inventory.PAPERDOLL_RHAND), 127));
writeD(charInfoPackage.getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND));
int weaponId = charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_RHAND);
if (weaponId == 8190) // Transform id
writeD(301);
else if (weaponId == 8689)
writeD(302);
else
writeD(0x00);
//TODO: Pet info?
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeF(0x00);
writeF(0x00);
writeD(charSelectionInfo.getVitalityPoints());
writeD(charSelectionInfo.getPremiumAccess() > 0 ? 300 : 200); // Vitality percent
writeD(5); //Vitaliti items count
writeD(charInfoPackage.getAccessLevel() > -100 ? 0x01 : 0x00);
writeC(0x00);
writeC(0x00);
}
}
public static CharSelectionInfo loadCharacterSelectInfo(String loginName) {
CharSelectionInfo charSelectionInfo = new CharSelectionInfo();
Connection con = null;
PreparedStatement statement = null;
ResultSet rset = null;
try {
con = DatabaseFactory.getInstance().getConnection();
statement = con.prepareStatement("SELECT * FROM characters AS c LEFT JOIN character_subclasses AS cs ON (c.obj_Id=cs.char_obj_id AND cs.active=1) WHERE account_name=? LIMIT 7");
statement.setString(1, loginName);
rset = statement.executeQuery();
while (rset.next()) { // fills the package
charSelectionInfo.addSelectionInfo(restoreChar(rset));
}
DbUtils.closeQuietly(statement, rset);
statement = con.prepareStatement("SELECT `points` FROM `vitality_points` WHERE `account_name`=?");
statement.setString(1, loginName);
rset = statement.executeQuery();
if (rset.next()) {
int points = rset.getInt(1);
charSelectionInfo.setVitalityPoints(points);
}
} catch (Exception e) {
_log.error("could not restore charinfo:", e);
} finally {
DbUtils.closeQuietly(con, statement, rset);
}
return charSelectionInfo;
}
private static int[] restoreBaseClassId(int objId) {
int[] classId = new int[2];
Connection con = null;
PreparedStatement statement = null;
ResultSet rset = null;
try {
con = DatabaseFactory.getInstance().getConnection();
statement = con.prepareStatement("SELECT class_id, default_class_id FROM character_subclasses WHERE char_obj_id=? AND type=" + SubClassType.BASE_CLASS.ordinal());
statement.setInt(1, objId);
rset = statement.executeQuery();
while (rset.next()) {
classId[0] = rset.getInt("class_id");
classId[1] = rset.getInt("default_class_id");
}
} catch (Exception e) {
_log.error("could not restore base class id:", e);
} finally {
DbUtils.closeQuietly(con, statement, rset);
}
return classId;
}
private static CharSelectInfoPackage restoreChar(ResultSet chardata) {
CharSelectInfoPackage charInfopackage = null;
try {
int objectId = chardata.getInt("obj_Id");
int classid = chardata.getInt("class_id");
int[] baseClassId = new int[]{classid, chardata.getInt("default_class_id")};
boolean useBaseClass = chardata.getInt("type") == SubClassType.BASE_CLASS.ordinal();
if (!useBaseClass)
baseClassId = restoreBaseClassId(objectId);
Race race = ClassId.VALUES[baseClassId[1]].getRace();
String name = chardata.getString("char_name");
charInfopackage = new CharSelectInfoPackage(objectId, name);
charInfopackage.setLevel(chardata.getInt("level"));
charInfopackage.setMaxHp(chardata.getInt("maxHp"));
charInfopackage.setCurrentHp(chardata.getDouble("curHp"));
charInfopackage.setMaxMp(chardata.getInt("maxMp"));
charInfopackage.setCurrentMp(chardata.getDouble("curMp"));
charInfopackage.setX(chardata.getInt("x"));
charInfopackage.setY(chardata.getInt("y"));
charInfopackage.setZ(chardata.getInt("z"));
charInfopackage.setPk(chardata.getInt("pkkills"));
charInfopackage.setPvP(chardata.getInt("pvpkills"));
charInfopackage.setFace(chardata.getInt("face"));
charInfopackage.setHairStyle(chardata.getInt("hairstyle"));
charInfopackage.setHairColor(chardata.getInt("haircolor"));
charInfopackage.setSex(chardata.getInt("sex"));
charInfopackage.setExp(chardata.getLong("exp"));
charInfopackage.setSp(chardata.getInt("sp"));
charInfopackage.setClanId(chardata.getInt("clanid"));
charInfopackage.setKarma(chardata.getInt("karma"));
charInfopackage.setRace(race.ordinal());
charInfopackage.setClassId(classid);
charInfopackage.setBaseClassId(baseClassId[0]);
long deletetime = chardata.getLong("deletetime");
int deletedays = 0;
if (Config.DELETE_DAYS > 0)
if (deletetime > 0) {
deletetime = (int) (System.currentTimeMillis() / 1000 - deletetime);
deletedays = (int) (deletetime / 3600 / 24);
if (deletedays >= Config.DELETE_DAYS) {
CharacterDAO.getInstance().deleteCharByObjId(objectId);
return null;
}
deletetime = Config.DELETE_DAYS * 3600 * 24 - deletetime;
} else
deletetime = 0;
charInfopackage.setDeleteTimer((int) deletetime);
charInfopackage.setLastAccess(chardata.getLong("lastAccess") * 1000L);
charInfopackage.setAccessLevel(chardata.getInt("accesslevel"));
if (charInfopackage.getAccessLevel() < 0 && !AutoBan.isBanned(objectId))
charInfopackage.setAccessLevel(0);
} catch (Exception e) {
_log.error("", e);
}
return charInfopackage;
}
}
Этот тоже не помог P.S. защиту вырезал в протокол версии , enterworld, gameclient
Добавлено через 1 час 36 минут
L2GameServerPacket возможно?
Сообщений: 102
Тем: 0
Зарегистрирован: Dec 2012
Репутация:
139
Amaranthe Написал:в скайп заявку кинул
Добавлено через 6 минут
PHP код: <?php
public class CharacterSelectionInfo extends L2GameServerPacket {
// dc cd SdSddddddddddffdQfddddddddddddddddddddddddddddddddddddddddffdddchhdddddffdd
private static final Logger _log = LoggerFactory.getLogger(CharacterSelectionInfo.class);
private String _loginName;
private int _sessionId;
private CharSelectionInfo charSelectionInfo;
public CharacterSelectionInfo(String loginName, int sessionId) {
_sessionId = sessionId;
_loginName = loginName;
charSelectionInfo = loadCharacterSelectInfo(loginName);
}
public CharSelectionInfo getCharInfo() {
return charSelectionInfo;
}
@Override
protected final void writeImpl() {
int size = charSelectionInfo.size();
writeC(0x09);
writeD(size);
writeD(0x07);
writeC(0x00);
writeC(0x01);
writeC(0x02);// хз у гв всегда 2 поступало
writeD(0x00);
long lastAccess = -1L;
int lastUsed = -1;
for (CharSelectInfoPackage info : charSelectionInfo) {
if (lastAccess < info.getLastAccess()) {
lastAccess = info.getLastAccess();
lastUsed++;
}
}
int i = 0;
for (CharSelectInfoPackage charInfoPackage : charSelectionInfo) {
writeS(charInfoPackage.getName());
writeD(charInfoPackage.getCharId()); // ?
writeS(_loginName);
writeD(_sessionId);
writeD(charInfoPackage.getClanId());
writeD(0x00); // ??
writeD(charInfoPackage.getSex());
writeD(charInfoPackage.getRace());
writeD(charInfoPackage.getBaseClassId());
writeD(0x01); // active ??
writeD(charInfoPackage.getX());
writeD(charInfoPackage.getY());
writeD(charInfoPackage.getZ());
writeF(charInfoPackage.getCurrentHp());
writeF(charInfoPackage.getCurrentMp());
writeD(charInfoPackage.getSp());
writeQ(charInfoPackage.getExp());
int lvl = charInfoPackage.getLevel();
writeF(Experience.getExpPercent(lvl, charInfoPackage.getExp()));
writeD(lvl);
writeD(charInfoPackage.getKarma());
writeD(charInfoPackage.getPk());
writeD(charInfoPackage.getPvP());
// 468 - ? (7)
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
for (int PAPERDOLL_ID : Inventory.PAPERDOLL_ORDER)
writeD(charInfoPackage.getPaperdollItemId(PAPERDOLL_ID));
// New Protocol 411
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
// End Protocol 411
writeD(charInfoPackage.getHairStyle());
writeD(charInfoPackage.getHairColor());
writeD(charInfoPackage.getFace());
writeF(charInfoPackage.getMaxHp()); // hp max
writeF(charInfoPackage.getMaxMp()); // mp max
writeD(charInfoPackage.getAccessLevel() > -100 ? charInfoPackage.getDeleteTimer() : -1);
writeD(charInfoPackage.getClassId());
writeD(i == lastUsed ? 1 : 0);
writeC(Math.min(charInfoPackage.getPaperdollEnchantEffect(Inventory.PAPERDOLL_RHAND), 127));
writeD(charInfoPackage.getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND));
int weaponId = charInfoPackage.getPaperdollItemId(Inventory.PAPERDOLL_RHAND);
if (weaponId == 8190) // Transform id
writeD(301);
else if (weaponId == 8689)
writeD(302);
else
writeD(0x00);
//TODO: Pet info?
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeF(0x00);
writeF(0x00);
writeD(charSelectionInfo.getVitalityPoints());
writeD(charSelectionInfo.getPremiumAccess() > 0 ? 300 : 200); // Vitality percent
writeD(5); //Vitaliti items count
writeD(charInfoPackage.getAccessLevel() > -100 ? 0x01 : 0x00);
writeC(0x00);
writeC(0x00);
}
}
public static CharSelectionInfo loadCharacterSelectInfo(String loginName) {
CharSelectionInfo charSelectionInfo = new CharSelectionInfo();
Connection con = null;
PreparedStatement statement = null;
ResultSet rset = null;
try {
con = DatabaseFactory.getInstance().getConnection();
statement = con.prepareStatement("SELECT * FROM characters AS c LEFT JOIN character_subclasses AS cs ON (c.obj_Id=cs.char_obj_id AND cs.active=1) WHERE account_name=? LIMIT 7");
statement.setString(1, loginName);
rset = statement.executeQuery();
while (rset.next()) { // fills the package
charSelectionInfo.addSelectionInfo(restoreChar(rset));
}
DbUtils.closeQuietly(statement, rset);
statement = con.prepareStatement("SELECT `points` FROM `vitality_points` WHERE `account_name`=?");
statement.setString(1, loginName);
rset = statement.executeQuery();
if (rset.next()) {
int points = rset.getInt(1);
charSelectionInfo.setVitalityPoints(points);
}
} catch (Exception e) {
_log.error("could not restore charinfo:", e);
} finally {
DbUtils.closeQuietly(con, statement, rset);
}
return charSelectionInfo;
}
private static int[] restoreBaseClassId(int objId) {
int[] classId = new int[2];
Connection con = null;
PreparedStatement statement = null;
ResultSet rset = null;
try {
con = DatabaseFactory.getInstance().getConnection();
statement = con.prepareStatement("SELECT class_id, default_class_id FROM character_subclasses WHERE char_obj_id=? AND type=" + SubClassType.BASE_CLASS.ordinal());
statement.setInt(1, objId);
rset = statement.executeQuery();
while (rset.next()) {
classId[0] = rset.getInt("class_id");
classId[1] = rset.getInt("default_class_id");
}
} catch (Exception e) {
_log.error("could not restore base class id:", e);
} finally {
DbUtils.closeQuietly(con, statement, rset);
}
return classId;
}
private static CharSelectInfoPackage restoreChar(ResultSet chardata) {
CharSelectInfoPackage charInfopackage = null;
try {
int objectId = chardata.getInt("obj_Id");
int classid = chardata.getInt("class_id");
int[] baseClassId = new int[]{classid, chardata.getInt("default_class_id")};
boolean useBaseClass = chardata.getInt("type") == SubClassType.BASE_CLASS.ordinal();
if (!useBaseClass)
baseClassId = restoreBaseClassId(objectId);
Race race = ClassId.VALUES[baseClassId[1]].getRace();
String name = chardata.getString("char_name");
charInfopackage = new CharSelectInfoPackage(objectId, name);
charInfopackage.setLevel(chardata.getInt("level"));
charInfopackage.setMaxHp(chardata.getInt("maxHp"));
charInfopackage.setCurrentHp(chardata.getDouble("curHp"));
charInfopackage.setMaxMp(chardata.getInt("maxMp"));
charInfopackage.setCurrentMp(chardata.getDouble("curMp"));
charInfopackage.setX(chardata.getInt("x"));
charInfopackage.setY(chardata.getInt("y"));
charInfopackage.setZ(chardata.getInt("z"));
charInfopackage.setPk(chardata.getInt("pkkills"));
charInfopackage.setPvP(chardata.getInt("pvpkills"));
charInfopackage.setFace(chardata.getInt("face"));
charInfopackage.setHairStyle(chardata.getInt("hairstyle"));
charInfopackage.setHairColor(chardata.getInt("haircolor"));
charInfopackage.setSex(chardata.getInt("sex"));
charInfopackage.setExp(chardata.getLong("exp"));
charInfopackage.setSp(chardata.getInt("sp"));
charInfopackage.setClanId(chardata.getInt("clanid"));
charInfopackage.setKarma(chardata.getInt("karma"));
charInfopackage.setRace(race.ordinal());
charInfopackage.setClassId(classid);
charInfopackage.setBaseClassId(baseClassId[0]);
long deletetime = chardata.getLong("deletetime");
int deletedays = 0;
if (Config.DELETE_DAYS > 0)
if (deletetime > 0) {
deletetime = (int) (System.currentTimeMillis() / 1000 - deletetime);
deletedays = (int) (deletetime / 3600 / 24);
if (deletedays >= Config.DELETE_DAYS) {
CharacterDAO.getInstance().deleteCharByObjId(objectId);
return null;
}
deletetime = Config.DELETE_DAYS * 3600 * 24 - deletetime;
} else
deletetime = 0;
charInfopackage.setDeleteTimer((int) deletetime);
charInfopackage.setLastAccess(chardata.getLong("lastAccess") * 1000L);
charInfopackage.setAccessLevel(chardata.getInt("accesslevel"));
if (charInfopackage.getAccessLevel() < 0 && !AutoBan.isBanned(objectId))
charInfopackage.setAccessLevel(0);
} catch (Exception e) {
_log.error("", e);
}
return charInfopackage;
}
}
Этот тоже не помог P.S. защиту вырезал в протокол версии , enterworld, gameclient
Добавлено через 1 час 36 минут
L2GameServerPacket возможно?
прости, занят был, какая защита? + что ты вырезал в протокол версии + в Enterworld ? + у меня в l2j без созданного персонажа на High Five нормально заходило в лобби, без изменений пакетов!!!
Сообщений: 95
Тем: 8
Зарегистрирован: Feb 2012
Репутация:
65
Mifesto Написал:может кто сталкивался с такой же проблемой, хочу посадить перса на Личную мастерскую, в пакете RequestRecipeShopListSet после всех проверок вызываю
Код: if(!createList.isEmpty())
{
manufacturer.setCreateList(createList);
manufacturer.saveTradeList();
manufacturer.setPrivateStoreType(Player.STORE_PRIVATE_MANUFACTURE);
manufacturer.broadcastPacket(new RecipeShopMsgPacket(manufacturer));
manufacturer.sitDown(null);
manufacturer.broadcastCharInfo();
}
при этом персонаж просто садится, но после этого мне присылается пакет RequestRecipeShopManageQuit и отменяет лавку, может кто знает из-за чего может клиент присылать RequestRecipeShopManageQuit? одно из условий это нажатие клавиши отмены, а еще каике есть? Код: case 0xbc:
//msg = new RequestRecipeShopManageQuit();
break;
Сообщений: 122
Тем: 6
Зарегистрирован: Sep 2013
Репутация:
112
ура и я наконец то это сделал, спасибо большое за помощь Bonux.
Сообщений: 527
Тем: 17
Зарегистрирован: Oct 2010
Репутация:
1,919
iquelite Написал:Код: case 0xbc:
//msg = new RequestRecipeShopManageQuit();
break;
не вариант, думаю что будут свои проблемы.
Сообщений: 1,240
Тем: 29
Зарегистрирован: May 2013
Репутация:
2,505
Код: manufacturer.sitDown(null);
Персонаж торгует стоя? Или это новый метод сажать чара? :eek:
Сообщений: 527
Тем: 17
Зарегистрирован: Oct 2010
Репутация:
1,919
Donatte Написал:Код: manufacturer.sitDown(null);
Персонаж торгует стоя? Или это новый метод сажать чара? :eek:
на самом деле старый,
-
Код: @Override
public void sitDown(StaticObjectInstance throne)
{
if(isSitting() || sittingTaskLaunched || isAlikeDead())
return;
if(isStunned() || isSleeping() || isParalyzed() || isAttackingNow() || isCastingNow() || isMoving)
{
getAI().setNextAction(nextAction.REST, null, null, false, false);
return;
}
resetWaitSitTime();
getAI().setIntention(CtrlIntention.AI_INTENTION_REST, null, null);
if(throne == null)
broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_SITTING));
else
broadcastPacket(new ChairSit(this, throne));
_sittingObject = throne;
setSitting(true);
sittingTaskLaunched = true;
ThreadPoolManager.getInstance().schedule(new EndSitDownTask(this), 2500);
}
Сообщений: 1,240
Тем: 29
Зарегистрирован: May 2013
Репутация:
2,505
Mifesto Написал:на самом деле старый,
-
Код: @Override
public void sitDown(StaticObjectInstance throne)
{
if(isSitting() || sittingTaskLaunched || isAlikeDead())
return;
if(isStunned() || isSleeping() || isParalyzed() || isAttackingNow() || isCastingNow() || isMoving)
{
getAI().setNextAction(nextAction.REST, null, null, false, false);
return;
}
resetWaitSitTime();
getAI().setIntention(CtrlIntention.AI_INTENTION_REST, null, null);
if(throne == null)
broadcastPacket(new ChangeWaitType(this, ChangeWaitType.WT_SITTING));
else
broadcastPacket(new ChairSit(this, throne));
_sittingObject = throne;
setSitting(true);
sittingTaskLaunched = true;
ThreadPoolManager.getInstance().schedule(new EndSitDownTask(this), 2500);
}
Странный код. В лыжах не используется статический объект.
|