Выделение мобов-чемпионов. (L2JServer) - Страница 2 - Форум администраторов игровых серверов
Форум администраторов игровых серверов StormWall - Защита от DDos атак
Регистрация Мнения Справка Сообщество Календарь
Вернуться   Форум администраторов игровых серверов > MMO > Lineage II

Lineage II
Дискуссии на тему создания, настройки и обслуживания серверов Lineage 2. При поддержке: Премиум услуги по рекламе

Ответ
Опции темы
Непрочитано 31.08.2009, 01:35   #11
Новичок

По умолчанию Ответ: Выделение мобов-чемпионов. (L2JServer)

Цитата:
Сообщение от xsabotagex Посмотреть сообщение
Во первых это не процедура, а класс.
Во вторых менять его не надо.
Не класс, а метод)))
wanderiel вне форума Ответить с цитированием
Непрочитано 31.08.2009, 22:54   #12
Аватар для arivano
Пользователь

Автор темы (Топик Стартер) Ответ: Выделение мобов-чемпионов. (L2JServer)

Буквально только что оставил пост на форуме разработчиков L2JServer, т.к. пользуюсь именно им. Может в какой сборке и будет внесено соответствующее изменение.
Спасибо xsabotagex.
arivano вне форума Отправить сообщение для arivano с помощью ICQ Отправить сообщение для arivano с помощью Skype™ Ответить с цитированием
Непрочитано 29.12.2009, 17:22   #13
Аватар для APKO
Постоялец

По умолчанию Re: Выделение мобов-чемпионов. (L2JServer)

Вот код файла
[SPOILER]/*
* 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.l2open.gameserver.network.serverpackets;

import com.l2open.Config;
import com.l2open.gameserver.datatables.CharTemplateTable ;
import com.l2open.gameserver.datatables.ClanTable;
import com.l2open.gameserver.datatables.FakePCsTable;
import com.l2open.gameserver.instancemanager.CursedWeapon sManager;
import com.l2open.gameserver.instancemanager.TownManager;
import com.l2open.gameserver.model.L2Clan;
import com.l2open.gameserver.model.L2Transformation;
import com.l2open.gameserver.model.actor.FakePc;
import com.l2open.gameserver.model.actor.L2Character;
import com.l2open.gameserver.model.actor.L2Decoy;
import com.l2open.gameserver.model.actor.L2Npc;
import com.l2open.gameserver.model.actor.L2Summon;
import com.l2open.gameserver.model.actor.L2Trap;
import com.l2open.gameserver.model.actor.instance.L2ClanH allDoormenInstance;
import com.l2open.gameserver.model.actor.instance.L2ClanH allManagerInstance;
import com.l2open.gameserver.model.actor.instance.L2Monst erInstance;
import com.l2open.gameserver.model.actor.instance.L2PcIns tance;
import com.l2open.gameserver.model.itemcontainer.Inventor y;
import com.l2open.gameserver.skills.AbnormalEffect;
import com.l2open.gameserver.templates.chars.L2PcTemplate ;

public abstract class AbstractNpcInfo extends L2GameServerPacket
{
// ddddddddddddddddddffffdddcccccSSddd dddddc
// ddddddddddddddddddffffdddcccccSSddd dddddccffd
private static final String _S__22_NPCINFO = "[S] 0c NpcInfo";
protected int _x, _y, _z, _heading;
protected int _idTemplate;
protected boolean _isAttackable, _isSummoned;
protected int _mAtkSpd, _pAtkSpd;
protected int _rhand, _lhand, _chest;
protected int _collisionHeight, _collisionRadius;
protected String _name = "";
protected String _title = "";
// Run speed, swimming run speed and flying run speed.
protected int _runSpd;
// Walking speed, swimming walking speed and flying walking speed.
protected int _walkSpd;

public AbstractNpcInfo(L2Character cha)
{
_isSummoned = cha.isShowSummonAnimation();
_x = cha.getX();
_y = cha.getY();
_z = cha.getZ();
_heading = cha.getHeading();
_mAtkSpd = cha.getMAtkSpd();
_pAtkSpd = cha.getPAtkSpd();
_runSpd = cha.getTemplate().baseRunSpd;
_walkSpd = cha.getTemplate().baseWalkSpd;
}

/*
* (non-Javadoc)
* @see com.l2open.gameserver.serverpackets.ServerBasePack et#getType()
*/
@Override
public String getType()
{
return _S__22_NPCINFO;
}

/**
* Packet for Npcs
*/
public static class NpcInfo extends AbstractNpcInfo
{
private L2Npc _npc;
private int _clanCrest = 0;
private int _allyCrest = 0;
private int _allyId = 0;
private int _clanId = 0;

public NpcInfo(L2Npc cha, L2Character attacker)
{
super(cha);
_npc = cha;
_idTemplate = cha.getTemplate().idTemplate; // On every subclass
_rhand = cha.getRightHandItem(); // On every subclass
_lhand = cha.getLeftHandItem(); // On every subclass
_collisionHeight = cha.getCollisionHeight();// On every subclass
_collisionRadius = cha.getCollisionRadius();// On every subclass
_isAttackable = cha.isAutoAttackable(attacker);
if (cha.getTemplate().serverSideName)
_name = cha.getTemplate().name;// On every subclass
if (Config.L2JMOD_CHAMPION_ENABLE && cha.isChampion())
_title = (Config.L2JMOD_CHAMP_TITLE);
else if (cha.getTemplate().serverSideTitle)
_title = cha.getTemplate().title; // On every subclass
else
_title = cha.getTitle(); // On every subclass
if (Config.SHOW_MONSTER_LVL && _npc instanceof L2MonsterInstance)
{
String t = "Lv " + cha.getLevel() + (cha.getAggroRange() > 0 ? "*" : "");
if (_title != null)
t += " " + _title;
_title = t;
}
int clanid = -1;
if (cha instanceof L2Npc && cha.isInsideZone(L2Character.ZONE_TOWN))
{
if (cha instanceof L2ClanHallDoormenInstance || cha instanceof L2ClanHallManagerInstance)
clanid = cha instanceof L2ClanHallDoormenInstance ? ((L2ClanHallDoormenInstance) cha).getClanHall().getOwnerId() : ((L2ClanHallManagerInstance) cha).getClanHall().getOwnerId();
else if (cha.getCastle().getOwnerId() != 0)
{
int townId = TownManager.getTown(_x, _y, _z).getTownId();
if (townId != 33 && townId != 22)
clanid = cha.getCastle().getOwnerId();
}
}
if (clanid > 0)
{
L2Clan clan = ClanTable.getInstance().getClan(clanid);
_clanCrest = clan.getCrestId();
_clanId = clan.getClanId();
_allyCrest = clan.getAllyCrestId();
_allyId = clan.getAllyId();
}
}

@Override
protected void writeImpl()
{
FakePc fpc = FakePCsTable.getInstance().getFakePc(_npc.getNpcId ());
if (fpc != null)
{
writeC(0x31);
writeD(_x);
writeD(_y);
writeD(_z);
writeD(_heading);
writeD(_npc.getObjectId());
writeS(fpc.name);
writeD(fpc.race);
writeD(fpc.sex);
writeD(fpc.clazz);
writeD(fpc.pdHairall);
writeD(fpc.pdHead);
writeD(fpc.pdRHand);
writeD(fpc.pdLHand);
writeD(fpc.pdGloves);
writeD(fpc.pdChest);
writeD(fpc.pdLegs);
writeD(fpc.pdFeet);
writeD(fpc.pdBack);
writeD(fpc.pdLRHand);
writeD(fpc.pdHair);
writeD(fpc.pdHair2);
// T1 new d's
writeD(fpc.pdRBracelet);
writeD(fpc.pdLBracelet);
writeD(fpc.pdDeco1);
writeD(fpc.pdDeco2);
writeD(fpc.pdDeco3);
writeD(fpc.pdDeco4);
writeD(fpc.pdDeco5);
writeD(fpc.pdDeco6);
// end of t1 new d's
// CT2.3
writeD(0x00);
// c6 new h's
writeD(fpc.pdUnderAug);
writeD(fpc.pdHeadAug);
writeD(fpc.pdRHandAug);
writeD(fpc.pdLHandAug);
writeD(fpc.pdGlovesAug);
writeD(fpc.pdChestAug);
writeD(fpc.pdLegsAug);
writeD(fpc.pdFeetAug);
writeD(fpc.pdBackAug);
writeD(fpc.pdLRHandAug);
writeD(fpc.pdHairAug);
writeD(fpc.pdHair2Aug);
// T1 new h's
writeD(fpc.pdRBraceletAug);
writeD(fpc.pdLBraceletAug);
writeD(fpc.pdDeco1Aug);
writeD(fpc.pdDeco2Aug);
writeD(fpc.pdDeco3);
writeD(fpc.pdDeco4);
writeD(fpc.pdDeco5);
writeD(fpc.pdDeco6);
// end of t1 new h's
// CT2.3
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(fpc.pvpFlag);
writeD(fpc.karma);
writeD(_mAtkSpd);
writeD(_pAtkSpd);
writeD(fpc.pvpFlag);
writeD(fpc.karma);
writeD(_runSpd);
writeD(_walkSpd);
writeD(50); // swimspeed
writeD(50); // swimspeed
writeD(_runSpd);
writeD(_walkSpd);
writeD(_runSpd);
writeD(_walkSpd);
writeF(_npc.getMovementSpeedMultiplier()); // _activeChar.getProperMultiplier()
writeF(_npc.getAttackSpeedMultiplier()); // _activeChar.getAttackSpeedMultiplier()
// TODO: add handling of mount collision
L2PcTemplate pctmpl = CharTemplateTable.getInstance().getTemplate(fpc.cl azz);
writeF(pctmpl.collisionRadius);
writeF(pctmpl.collisionHeight);
writeD(fpc.hairStyle);
writeD(fpc.hairColor);
writeD(fpc.face);
writeS(fpc.title);
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(0x00);
// In UserInfo leader rights and siege flags, but here found
// nothing??
// Therefore RelationChanged packet with that info is required
writeD(0);
writeC(0x01); // standing = 1 sitting = 0
writeC(_npc.isRunning() ? 1 : 0); // running = 1 walking = 0
writeC(_npc.isInCombat() ? 1 : 0);
writeC(_npc.isAlikeDead() ? 1 : 0);
writeC(fpc.invisible); // invisible = 1 visible =0
writeC(fpc.mount); // 1 on strider 2 on wyvern 3 on Great Wolf 0
// no mount
writeC(0x00); // 1 - sellshop
writeH(0x00); // cubic count
// for (int id : allCubics)
// writeH(id);
writeC(0x00); // find party members
writeD(0x00);
writeC(0x00); // Changed by Thorgrim
writeH(0x00); // Blue value for name (0 = white, 255 = pure
// blue)
writeD(fpc.clazz);
writeD(0x00);// max cp
writeD(0x00);// cur cp
writeC(fpc.enchantEffect);
writeC(fpc.team); // team circle around feet 1= Blue, 2 = red
writeD(0x00);
writeC(0x00); // Symbol on char menu ctrl+I
writeC(fpc.hero); // Hero Aura
writeC(fpc.fishing); // 0x01: Fishing Mode (Cant be undone by
// setting back to 0)
writeD(fpc.fishingX);
writeD(fpc.fishingY);
writeD(fpc.fishingZ);
writeD(fpc.nameColor);
writeD(0x00); // isRunning() as in UserInfo?
writeD(0x00); // pledge class
writeD(0x00); // ??
writeD(fpc.titleColor);
// writeD(0x00); // ??
writeD(0x00); // cursed weapon level
// T1
writeD(0x00);
writeD(0x00); // transformation id
}
else
{
writeC(0x0c);
writeD(_npc.getObjectId());
writeD(_idTemplate + 1000000); // npctype id
writeD(_isAttackable ? 1 : 0);
writeD(_x);
writeD(_y);
writeD(_z);
writeD(_heading);
writeD(0x00);
writeD(_mAtkSpd);
writeD(_pAtkSpd);
writeD(_runSpd);
writeD(_walkSpd);
writeD(_runSpd); // swim run speed
writeD(_walkSpd); // swim walk speed
writeD(_runSpd); // fly run speed
writeD(_walkSpd); // fly walk speed
writeD(_runSpd); // fly run speed
writeD(_walkSpd); // fly walk speed
writeF(_npc.getMovementSpeedMultiplier());
writeF(_npc.getAttackSpeedMultiplier());
writeF(_collisionRadius);
writeF(_collisionHeight);
writeD(_rhand); // right hand weapon
writeD(_chest);
writeD(_lhand); // left hand weapon
writeC(1); // name above char 1=true ... ??
writeC(_npc.isRunning() ? 1 : 0);
writeC(_npc.isInCombat() ? 1 : 0);
writeC(_npc.isAlikeDead() ? 1 : 0);
writeC(_isSummoned ? 2 : 0); // 0=teleported 1=default
// 2=summoned
writeS(_name);
writeS(_title);
writeD(0x00); // Title color 0=client default
writeD(0x00);
writeD(0x00); // pvp flag
writeD(_npc.getAbnormalEffect()); // C2
writeD(_clanId);
writeD(_clanCrest);
writeD(_allyId);
writeD(_allyCrest);
writeC(_npc.isFlying() ? 2 : 0); // C2
writeC(_npc.getTeam()); // title color 0=client
writeF(_collisionRadius);
writeF(_collisionHeight);
writeD(0x00); // C4
writeD(_npc.isFlying() ? 1 : 0); // C6
writeD(0x00);
writeD(0x00);// CT1.5 Pet form and skills
writeC(0x01);
writeC(0x01);
writeD(_npc.getSpecialEffect());
}
}
}

public static class TrapInfo extends AbstractNpcInfo
{
private L2Trap _trap;

public TrapInfo(L2Trap cha, L2Character attacker)
{
super(cha);
_trap = cha;
_idTemplate = cha.getTemplate().idTemplate;
_isAttackable = cha.isAutoAttackable(attacker);
_rhand = 0;
_lhand = 0;
_collisionHeight = _trap.getTemplate().collisionHeight;
_collisionRadius = _trap.getTemplate().collisionRadius;
_title = cha.getOwner().getName();
_runSpd = _trap.getRunSpeed();
_walkSpd = _trap.getWalkSpeed();
}

@Override
protected void writeImpl()
{
writeC(0x0c);
writeD(_trap.getObjectId());
writeD(_idTemplate + 1000000); // npctype id
writeD(_isAttackable ? 1 : 0);
writeD(_x);
writeD(_y);
writeD(_z);
writeD(_heading);
writeD(0x00);
writeD(_mAtkSpd);
writeD(_pAtkSpd);
writeD(_runSpd);
writeD(_walkSpd);
writeD(_runSpd); // swimspeed
writeD(_walkSpd); // swimspeed
writeD(_runSpd);
writeD(_walkSpd);
writeD(_runSpd);
writeD(_walkSpd);
writeF(_trap.getMovementSpeedMultiplier());
writeF(_trap.getAttackSpeedMultiplier());
writeF(_collisionRadius);
writeF(_collisionHeight);
writeD(_rhand); // right hand weapon
writeD(_chest);
writeD(_lhand); // left hand weapon
writeC(1); // name above char 1=true ... ??
writeC(1);
writeC(_trap.isInCombat() ? 1 : 0);
writeC(_trap.isAlikeDead() ? 1 : 0);
writeC(_isSummoned ? 2 : 0); // 0=teleported 1=default 2=summoned
writeS(_name);
writeS(_title);
writeD(0x00); // title color 0 = client default
writeD(0x00);
writeD(0x00); // pvp flag
writeD(_trap.getAbnormalEffect()); // C2
writeD(0x00); // clan id
writeD(0x00); // crest id
writeD(0000); // C2
writeD(0000); // C2
writeD(0000); // C2
writeC(0000); // C2
writeC(_trap.getTeam()); // Title color 0=client default
writeF(_collisionRadius);
writeF(_collisionHeight);
writeD(0x00); // C4
writeD(0x00); // C6
writeD(0x00);
writeD(0);// CT1.5 Pet form and skills
writeC(0x01);
writeC(0x01);
writeD(0x00);
}
}

/**
* Packet for Decoys
*/
public static class DecoyInfo extends AbstractNpcInfo
{
private L2Decoy _decoy;

public DecoyInfo(L2Decoy cha)
{
super(cha);
_idTemplate = cha.getTemplate().idTemplate;
_decoy = cha;
_heading = cha.getOwner().getHeading();
// _mAtkSpd = cha.getMAtkSpd(); on abstract constructor
_pAtkSpd = cha.getOwner().getPAtkSpd();
_runSpd = cha.getOwner().getRunSpeed();
_walkSpd = cha.getOwner().getWalkSpeed();
if (_idTemplate < 13071 || _idTemplate > 13076)
{
if (Config.ASSERT)
throw new AssertionError("Using DecoyInfo packet with an unsupported decoy template: " + _idTemplate);
else
throw new IllegalArgumentException("Using DecoyInfo packet with an unsupported decoy template: " + _idTemplate);
}
}

@Override
protected void writeImpl()
{
writeC(0x31);
writeD(_x);
writeD(_y);
writeD(_z);
writeD(_heading);
writeD(_decoy.getObjectId());
writeS(_decoy.getOwner().getAppearance().getVisibl eName());
writeD(_decoy.getOwner().getRace().ordinal());
writeD(_decoy.getOwner().getAppearance().getSex() ? 1 : 0);
if (_decoy.getOwner().getClassIndex() == 0)
writeD(_decoy.getOwner().getClassId().getId());
else
writeD(_decoy.getOwner().getBaseClass());
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_HAIRALL));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_HEAD));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_RHAND));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_LHAND));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_GLOVES));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_CHEST));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_LEGS));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_FEET));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_BACK));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_LRHAND));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_HAIR));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_HAIR2));
// T1 new d's
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_RBRACELET));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_LBRACELET));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_DECO1));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_DECO2));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_DECO3));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_DECO4));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_DECO5));
writeD(_decoy.getOwner().getInventory().getPaperdo llItemId(Inventory.PAPERDOLL_DECO6));
// end of t1 new d's
// CT2.3
writeD(0x00);
// c6 new h's
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_UNDER));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_HEAD));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_RHAND));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_LHAND));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_GLOVES));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_CHEST));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_LEGS));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_FEET));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_BACK));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_LRHAND));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_HAIR));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_HAIR2));
// T1 new h's
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_RBRACELET));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_LBRACELET));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_DECO1));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_DECO2));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_DECO3));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_DECO4));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_DECO5));
writeD(_decoy.getOwner().getInventory().getPaperdo llAugmentationId(Inventory.PAPERDOLL_DECO6));
// end of t1 new h's
// CT2.3
writeD(0x00);
writeD(0x00);
writeD(0x00);
writeD(_decoy.getOwner().getPvpFlag());
writeD(_decoy.getOwner().getKarma());
writeD(_mAtkSpd);
writeD(_pAtkSpd);
writeD(_decoy.getOwner().getPvpFlag());
writeD(_decoy.getOwner().getKarma());
writeD(_runSpd);
writeD(_walkSpd);
writeD(50); // swim run speed
writeD(50); // swim walk speed
writeD(_runSpd); // fly run speed
writeD(_walkSpd); // fly walk speed
writeD(_runSpd); // fly run speed
writeD(_walkSpd); // fly walk speed
writeF(_decoy.getOwner().getMovementSpeedMultiplie r()); // _activeChar.getProperMultiplier()
writeF(_decoy.getOwner().getAttackSpeedMultiplier( )); // _activeChar.getAttackSpeedMultiplier()
L2Summon pet = _decoy.getPet();
L2Transformation trans;
if (_decoy.getOwner().getMountType() != 0 && pet != null)
{
writeF(pet.getTemplate().collisionRadius);
writeF(pet.getTemplate().collisionHeight);
}
else if ((trans = _decoy.getOwner().getTransformation()) != null)
{
writeF(trans.getCollisionRadius());
writeF(trans.getCollisionHeight());
}
else
{
writeF(_decoy.getOwner().getBaseTemplate().collisi onRadius);
writeF(_decoy.getOwner().getBaseTemplate().collisi onHeight);
}
writeD(_decoy.getOwner().getAppearance().getHairSt yle());
writeD(_decoy.getOwner().getAppearance().getHairCo lor());
writeD(_decoy.getOwner().getAppearance().getFace() );
writeS(_decoy.getOwner().getAppearance().getVisibl eTitle());
writeD(_decoy.getOwner().getClanId());
writeD(_decoy.getOwner().getClanCrestId());
writeD(_decoy.getOwner().getAllyId());
writeD(_decoy.getOwner().getAllyCrestId());
// In UserInfo leader rights and siege flags, but here found
// nothing??
// Therefore RelationChanged packet with that info is required
writeD(0);
writeC(_decoy.getOwner().isSitting() ? 0 : 1); // standing = 1
// sitting = 0
writeC(_decoy.getOwner().isRunning() ? 1 : 0); // running = 1
// walking = 0
writeC(_decoy.getOwner().isInCombat() ? 1 : 0);
writeC(_decoy.getOwner().isAlikeDead() ? 1 : 0);
writeC(_decoy.getOwner().getAppearance().getInvisi ble() ? 1 : 0); // invisible
// =
// 1
// visible
// =0
writeC(_decoy.getOwner().getMountType()); // 1 on strider 2 on
// wyvern 3 on Great
// Wolf 0 no mount
writeC(_decoy.getOwner().getPrivateStoreType()); // 1 - sellshop
writeH(_decoy.getOwner().getCubics().size());
for (int id : _decoy.getOwner().getCubics().keySet())
writeH(id);
writeC(0x00); // find party members
writeD(_decoy.getOwner().getAbnormalEffect());
writeC(_decoy.getOwner().getRecomLeft()); // Changed by Thorgrim
writeH(_decoy.getOwner().getRecomHave()); // Blue value for name (0
// = white, 255 = pure
// blue)
writeD(_decoy.getOwner().getClassId().getId());
writeD(_decoy.getOwner().getMaxCp());
writeD((int) _decoy.getOwner().getCurrentCp());
writeC(_decoy.getOwner().isMounted() ? 0 : _decoy.getOwner().getEnchantEffect());
writeC(_decoy.getTeam()); // team circle around feet 1= Blue, 2 = red
writeD(_decoy.getOwner().getClanCrestLargeId());
writeC(_decoy.getOwner().isNoble() ? 1 : 0); // Symbol on char menu
// ctrl+I
writeC(_decoy.getOwner().isHero() ? 1 : 0); // Hero Aura
writeC(_decoy.getOwner().isFishing() ? 1 : 0); // 0x01: Fishing Mode
// (Cant be undone
// by setting back
// to 0)
writeD(_decoy.getOwner().getFishx());
writeD(_decoy.getOwner().getFishy());
writeD(_decoy.getOwner().getFishz());
writeD(_decoy.getOwner().getAppearance().getNameCo lor());
writeD(0x00); // isRunning() as in UserInfo?
writeD(_decoy.getOwner().getPledgeClass());
writeD(0x00); // ??
writeD(_decoy.getOwner().getAppearance().getTitleC olor());
// writeD(0x00); // ??
if (_decoy.getOwner().isCursedWeaponEquipped())
writeD(CursedWeaponsManager.getInstance().getLevel (_decoy.getOwner().getCursedWeaponEquippedId()));
else
writeD(0x00);
// T1
writeD(0x00);
writeD(_decoy.getOwner().getTransformationId());
}
}

/**
* Packet for summons
*/
public static class SummonInfo extends AbstractNpcInfo
{
private L2Summon _summon;
private int _form = 0;
private int _val = 0;

public SummonInfo(L2Summon cha, L2Character attacker, int val)
{
super(cha);
_summon = cha;
_val = val;
int npcId = cha.getTemplate().npcId;
if (npcId == 16041 || npcId == 16042)
{
if (cha.getLevel() > 84)
_form = 3;
else if (cha.getLevel() > 79)
_form = 2;
else if (cha.getLevel() > 74)
_form = 1;
}
else if (npcId == 16025 || npcId == 16037)
{
if (cha.getLevel() > 69)
_form = 3;
else if (cha.getLevel() > 64)
_form = 2;
else if (cha.getLevel() > 59)
_form = 1;
}
// fields not set on AbstractNpcInfo
_isAttackable = cha.isAutoAttackable(attacker);
_rhand = cha.getWeapon();
_lhand = 0;
_chest = cha.getArmor();
_name = cha.getName();
_title = cha.getOwner() != null ? (cha.getOwner().isOnline() == 0 ? "" : cha.getOwner().getName()) : ""; // when
// owner
// online,
// summon
// will
// show
// in
// title
// owner
// name
_idTemplate = cha.getTemplate().idTemplate;
_collisionHeight = cha.getTemplate().collisionHeight;
_collisionRadius = cha.getTemplate().collisionRadius;
_invisible = cha.getOwner() != null ? cha.getOwner().getAppearance().getInvisible() : false;
// few fields needing fix from AbstractNpcInfo
_runSpd = cha.getPetSpeed();
_walkSpd = cha.isMountable() ? 45 : 30;
}

@Override
protected void writeImpl()
{
boolean gmSeeInvis = false;
if (_invisible)
{
L2PcInstance tmp = getClient().getActiveChar();
if (tmp != null && tmp.isGM())
gmSeeInvis = true;
}
writeC(0x0c);
writeD(_summon.getObjectId());
writeD(_idTemplate + 1000000); // npctype id
writeD(_isAttackable ? 1 : 0);
writeD(_x);
writeD(_y);
writeD(_z);
writeD(_heading);
writeD(0x00);
writeD(_mAtkSpd);
writeD(_pAtkSpd);
writeD(_runSpd);
writeD(_walkSpd);
writeD(_runSpd); // swim run speed
writeD(_walkSpd); // swim walk speed
writeD(_runSpd); // fly run speed
writeD(_walkSpd); // fly walk speed
writeD(_runSpd); // fly run speed
writeD(_walkSpd); // fly walk speed
writeF(_summon.getMovementSpeedMultiplier());
writeF(_summon.getAttackSpeedMultiplier());
writeF(_collisionRadius);
writeF(_collisionHeight);
writeD(_rhand); // right hand weapon
writeD(_chest);
writeD(_lhand); // left hand weapon
writeC(1); // name above char 1=true ... ??
writeC(1); // always running 1=running 0=walking
writeC(_summon.isInCombat() ? 1 : 0);
writeC(_summon.isAlikeDead() ? 1 : 0);
writeC(_val); // 0=teleported 1=default 2=summoned
writeS(_name);
writeS(_title);
writeD(0x01);// Title color 0=client default
writeD(_summon.getPvpFlag());
writeD(_summon.getKarma());
if (gmSeeInvis)
writeD(_summon.getAbnormalEffect() | AbnormalEffect.STEALTH.getMask());
else
writeD(_summon.getAbnormalEffect()); // C2
writeD(0x00); // clan id
writeD(0x00); // crest id
writeD(0000); // C2
writeD(0000); // C2
writeC(0000); // C2
writeC(_summon.getTeam());// Title color 0=client default
writeF(_collisionRadius);
writeF(_collisionHeight);
writeD(0x00); // C4
writeD(0x00); // C6
writeD(0x00);
writeD(_form);// CT1.5 Pet form and skills
writeC(0x01);
writeC(0x01);
writeD(0x00);
}
}
}[/SPOILER]
В какую строку вставить изменение? непойму...
APKO вне форума Ответить с цитированием
Непрочитано 14.02.2010, 17:42   #14
Пользователь

По умолчанию Re: Выделение мобов-чемпионов. (L2JServer)

Вопрос ещё актуален или решение уже есть?
OLEGALT вне форума Ответить с цитированием
Непрочитано 16.02.2010, 20:09   #15
Аватар для arivano
Пользователь

Автор темы (Топик Стартер) Re: Выделение мобов-чемпионов. (L2JServer)

думаю, что актуален, но спецов по Java, который вставят код в сборку нет.
arivano вне форума Отправить сообщение для arivano с помощью ICQ Отправить сообщение для arivano с помощью Skype™ Ответить с цитированием
Непрочитано 17.02.2010, 19:46   #16
Пользователь

По умолчанию Re: Выделение мобов-чемпионов. (L2JServer)

Могу только дать код что бы чампы были красные. Взято с L2open, код от их сборок подходит почти без изменений...

В файл - l2jmods.properties нужно добавить:
Код:
ChampAura = True либо False
Config.java нужно добавить строки в L2JMods Settings:
Код:
public static boolean CHAMP_AURA;
и в Load L2JMod L2Properties file:
Код:
CHAMP_AURA = Boolean.parseBoolean(L2JModSettings.getProperty("ChampAura", "false"));
В файл - AbstractNpcInfo.java в protected void writeImpl() находишь строку
Код:
writeC(_npc.isFlying() ? 2 : 0); // C2
и делаешь что бы стало вот так:
Код:
writeC(_npc.isFlying() ? 2 : 0); // C2
//writeC(0x00); // title color 0=client
if (Config.CHAMP_AURA)
{
	writeC(_npc.isChampion() ? 0x02 : 0x00);
}
else
{
	writeC(0x00); // title color 0=client;
}
writeF(_collisionRadius);
компилишь)
OLEGALT вне форума Ответить с цитированием
Непрочитано 19.02.2010, 17:44   #17
Пользователь

По умолчанию Re: Выделение мобов-чемпионов. (L2JServer)

Если заменить
Код:
writeC(_npc.isChampion() ? 0x02 : 0x00);
на
Код:
writeC(_npc.isChampion() ? 0x01 : 0x00);
то они станут синими, надо дописать код что бы были сразу двое и синие, и красные, думаю с этим у вас проблем не возникнет! copy-paste)
OLEGALT вне форума Ответить с цитированием
Непрочитано 04.04.2010, 13:14   #18
Пользователь

По умолчанию Re: Выделение мобов-чемпионов. (L2JServer)

Цитата:
Set the aura-flag to 1 or 2 in NpcInfo.
Это ответ с форума l2jserver.
непонятно что есть npcinfo, и где его искать.
iamhawk вне форума Ответить с цитированием
Непрочитано 04.04.2010, 18:18   #19
Пользователь

По умолчанию Re: Выделение мобов-чемпионов. (L2JServer)

public void setChampion - метод класса, а не класс
figure вне форума Ответить с цитированием
Непрочитано 05.04.2010, 08:54   #20
Пользователь

По умолчанию Re: Выделение мобов-чемпионов. (L2JServer)

Прокоментируйте мой предыдущий пост пожалуйста, если кто знает..
iamhawk вне форума Ответить с цитированием
Ответ


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход


© 2007–2024 «Форум администраторов игровых серверов»
Защита сайта от DDoS атак — StormWall
Работает на Булке неизвестной версии с переводом от zCarot
Текущее время: 02:54. Часовой пояс GMT +3.

Вверх