Jump to content
  • 0

Don't See Weapon


leanrocki

Question

Hello community! I have a problem, i work in me sv... and i have idea but can't make :c... my idea: the people  can't see the weapon to other players... i onlly can use the code DressMe to work that but i can't arm, some can help me pliz?

 

Sorry for me english  :okey:

Edited by leanrocki
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

CharInfo

        writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
        writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));

all of them replace with

        writeD(0);
        writeD(0);
Edited by SweeTs
Link to comment
Share on other sites

  • 0

User info:

/*
 * 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 net.sf.l2j.gameserver.network.serverpackets;
 
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.datatables.NpcTable;
import net.sf.l2j.gameserver.instancemanager.CursedWeaponsManager;
import net.sf.l2j.gameserver.model.Location;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.itemcontainer.Inventory;
import net.sf.l2j.gameserver.skills.AbnormalEffect;
 
public class CharInfo extends L2GameServerPacket
{
private final L2PcInstance _activeChar;
private final Inventory _inv;
private final int _x, _y, _z, _heading;
private final int _mAtkSpd, _pAtkSpd;
private final int _runSpd, _walkSpd;
private final float _moveMultiplier;
 
public CharInfo(L2PcInstance cha)
{
_activeChar = cha;
_inv = _activeChar.getInventory();
 
_x = _activeChar.getX();
_y = _activeChar.getY();
_z = _activeChar.getZ();
_heading = _activeChar.getHeading();
 
_mAtkSpd = _activeChar.getMAtkSpd();
_pAtkSpd = _activeChar.getPAtkSpd();
 
_moveMultiplier = _activeChar.getMovementSpeedMultiplier();
_runSpd = (int) (_activeChar.getRunSpeed() / _moveMultiplier);
_walkSpd = (int) (_activeChar.getWalkSpeed() / _moveMultiplier);
}
 
@Override
protected final void writeImpl()
{
boolean gmSeeInvis = false;
 
if (_activeChar.getAppearance().getInvisible())
{
L2PcInstance tmp = getClient().getActiveChar();
if (tmp != null && tmp.isGM())
gmSeeInvis = true;
}
 
writeC(0x03);
writeD(_x);
writeD(_y);
writeD(_z);
writeD(_heading);
writeD(_activeChar.getObjectId());
writeS(_activeChar.getName());
writeD(_activeChar.getRace().ordinal());
writeD(_activeChar.getAppearance().getSex() ? 1 : 0);
 
if (_activeChar.getClassIndex() == 0)
writeD(_activeChar.getClassId().getId());
else
writeD(_activeChar.getBaseClass());
 
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL));
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
writeD(0);
writeD(0);
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET));
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK));
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE));
 
// c6 new h's
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeD(_inv.getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND));
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeD(_inv.getPaperdollAugmentationId(Inventory.PAPERDOLL_LHAND));
writeH(0x00);
writeH(0x00);
writeH(0x00);
writeH(0x00);
 
writeD(_activeChar.getPvpFlag());
writeD(_activeChar.getKarma());
 
writeD(_mAtkSpd);
writeD(_pAtkSpd);
 
writeD(_activeChar.getPvpFlag());
writeD(_activeChar.getKarma());
 
writeD(_runSpd);
writeD(_walkSpd);
writeD(_runSpd); // swim run speed
writeD(_walkSpd); // swim walk speed
writeD(_runSpd); // fl run speed
writeD(_walkSpd); // fl walk speed
writeD(_runSpd); // fly run speed
writeD(_walkSpd); // fly walk speed
writeF(_activeChar.getMovementSpeedMultiplier());
writeF(_activeChar.getAttackSpeedMultiplier());
 
if (_activeChar.getMountType() != 0)
{
writeF(NpcTable.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionRadius());
writeF(NpcTable.getInstance().getTemplate(_activeChar.getMountNpcId()).getCollisionHeight());
}
else
{
writeF(_activeChar.getBaseTemplate().getCollisionRadius());
writeF(_activeChar.getBaseTemplate().getCollisionHeight());
}
 
writeD(_activeChar.getAppearance().getHairStyle());
writeD(_activeChar.getAppearance().getHairColor());
writeD(_activeChar.getAppearance().getFace());
 
if (gmSeeInvis)
writeS("Invisible");
else
writeS(_activeChar.getTitle());
 
writeD(_activeChar.getClanId());
writeD(_activeChar.getClanCrestId());
writeD(_activeChar.getAllyId());
writeD(_activeChar.getAllyCrestId());
 
writeD(0);
 
writeC(_activeChar.isSitting() ? 0 : 1); // standing = 1 sitting = 0
writeC(_activeChar.isRunning() ? 1 : 0); // running = 1 walking = 0
writeC(_activeChar.isInCombat() ? 1 : 0);
writeC(_activeChar.isAlikeDead() ? 1 : 0);
 
if (gmSeeInvis)
writeC(0);
else
writeC(_activeChar.getAppearance().getInvisible() ? 1 : 0); // invisible = 1 visible =0
 
writeC(_activeChar.getMountType()); // 1 on strider 2 on wyvern 0 no mount
writeC(_activeChar.getPrivateStoreType()); // 1 - sellshop
 
writeH(_activeChar.getCubics().size());
for (int id : _activeChar.getCubics().keySet())
writeH(id);
 
writeC(_activeChar.isInPartyMatchRoom() ? 1 : 0);
 
if (gmSeeInvis)
writeD((_activeChar.getAbnormalEffect() | AbnormalEffect.STEALTH.getMask()));
else
writeD(_activeChar.getAbnormalEffect());
 
writeC(_activeChar.getRecomLeft());
writeH(_activeChar.getRecomHave()); // Blue value for name (0 = white, 255 = pure blue)
writeD(_activeChar.getClassId().getId());
 
writeD(_activeChar.getMaxCp());
writeD((int) _activeChar.getCurrentCp());
writeC(_activeChar.isMounted() ? 0 : _activeChar.getEnchantEffect());
 
if (_activeChar.getTeam() == 1)
writeC(0x01); // team circle around feet 1= Blue, 2 = red
else if (_activeChar.getTeam() == 2)
writeC(0x02); // team circle around feet 1= Blue, 2 = red
else
writeC(0x00); // team circle around feet 1= Blue, 2 = red
 
writeD(_activeChar.getClanCrestLargeId());
writeC(_activeChar.isNoble() ? 1 : 0); // Symbol on char menu ctrl+I
writeC((_activeChar.isHero() || (_activeChar.isGM() && Config.GM_HERO_AURA)) ? 1 : 0); // Hero Aura
 
writeC(_activeChar.isFishing() ? 1 : 0); // 0x01: Fishing Mode (Cant be undone by setting back to 0)
 
Location loc = _activeChar.getFishingLoc();
if (loc != null)
{
writeD(loc.getX());
writeD(loc.getY());
writeD(loc.getZ());
}
else
{
writeD(0);
writeD(0);
writeD(0);
}
 
writeD(_activeChar.getAppearance().getNameColor());
 
writeD(0x00); // isRunning() as in UserInfo?
 
writeD(_activeChar.getPledgeClass());
writeD(_activeChar.getPledgeType());
 
writeD(_activeChar.getAppearance().getTitleColor());
 
if (_activeChar.isCursedWeaponEquipped())
writeD(CursedWeaponsManager.getInstance().getCurrentStage(_activeChar.getCursedWeaponEquippedId()) - 1);
else
writeD(0x00);
}
}

pp53.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Edit: ADD IMG 

Edited by leanrocki
Link to comment
Share on other sites

  • 0

Damn, ppl can't even replace 3 lines of code properly.. :happyforever:

 

Replace with base and do as I said, I tested it and it's working well. So, you messed / your fault :P

Link to comment
Share on other sites

  • 0
### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java
===================================================================
--- java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java    (revision 317)
+++ java/net/sf/l2j/gameserver/network/serverpackets/CharInfo.java    (working copy)
@@ -78,14 +78,14 @@
         
         writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL));
         writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD));
-        writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
-        writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND));
+        writeD(0);
+        writeD(0);
         writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES));
         writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST));
         writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS));
         writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET));
         writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK));
-        writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND));
+        writeD(0);
         writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR));
         writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE));
         
@@ -94,7 +94,7 @@
         writeH(0x00);
         writeH(0x00);
         writeH(0x00);
-        writeD(_inv.getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND));
+        writeD(0);
         writeH(0x00);
         writeH(0x00);
         writeH(0x00);
@@ -107,7 +107,7 @@
         writeH(0x00);
         writeH(0x00);
         writeH(0x00);
-        writeD(_inv.getPaperdollAugmentationId(Inventory.PAPERDOLL_LHAND));
+        writeD(0);
         writeH(0x00);
         writeH(0x00);
         writeH(0x00);

y81f.png

 

 

You didn't replaced 2 lines

 

 

writeD(_inv.getPaperdollAugmentationId(Inventory.PAPERDOLL_RHAND));
writeD(_inv.getPaperdollAugmentationId(Inventory.PAPERDOLL_LHAND));
Edited by SweeTs
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • i tryed to copy the admin    serverinfo.htm  to the communityboard.  the command  %onlineALL%  but it does not work.   any advice?   <html><title>Admin Server Info</title><body> <center> <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>Server Info</center></td> <td width=45><button value="Back" action="bypass -h admin_admin4" width=45 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> </tr> </table> <br> <font color="LEVEL">General:<font><br1> <table width="270" border="0" bgcolor="444444"> <tr> <td>OS:</td> <td><font color="00FF00">%os_name%</font></td> </tr> <tr> <td>OS version:</td> <td><font color="00FF00">%os_ver%</font></td> </tr> <tr> <td>Server slots:</td> <td><font color="00FF00">%slots%</font></td> </tr> <tr> <td>Server UpTime:</td> <td><font color="00FF00">%serverUpTime%</font></td> </tr> <tr> <td>Server Time:</td> <td><font color="00FF00">%serverTime%</font></td> </tr> <tr> <td>Game Time:</td> <td><font color="00FF00">%gameTime% (%dayNight%)</font></td> </tr> <tr> <td>Pathfinding:</td> <td><font color="00FF00">%geodata%</font></td> </tr> </table> <br> <font color="LEVEL">Players:<font><br1> <table width="270" border="0" bgcolor="444444"> <tr> <td>Total players count:</td> <td><font color="00FF00">%onlineAll%</font></td> </tr> <tr> <td>Offline trade count:</td> <td><font color="00FF00">%offlineTrade%</font></td> </tr> <tr> <td>Online GM count:</td> <td><font color="00FF00">%onlineGM%</font></td> </tr> <tr> <td>Real player count:</td> <td><font color="00FF00">%onlineReal%</font></td> </tr> </table> <br> <font color="LEVEL">Memory:<font><br1> <table width="270" border="0" bgcolor="444444"> <tr> <td>Used Memory:</td> <td><font color="00FF00">%usedMem% MB</font></td> </tr> <tr> <td>Free Memory:</td> <td><font color="00FF00">%freeMem% MB</font></td> </tr> <tr> <td>Total Memory:</td> <td><font color="00FF00">%totalMem% MB</font></td> </tr> </table> </center> </body></html>  
    • IntelliJ IDE has native support for Gradle, as far as I'm aware.
    • please is any one here that can  take the surces from grable to normal eclipse and reshare it here cause i don't have any clue how to install them On Eclipse 😕  if is any one here that can understand how those surces can be instaled please any help gonna be perfect iven i can  pay bay paypal. thanks
    • Wts A/S grade gear (armors weapons jewelery) Great Wolf with top eq Kokabora lvl 55+  Baium zaken frintezza   ADENA - 1kk - 0.25$ (big stock)   I can sell grand khavatarii with noblesse and subclass with email (can be with gear or clear)    Payment by PayPal, can use middleman   PM here  
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock