Jump to content
  • 0

Latest Revision Ctf Errors..!


Question

Posted

Hello... so i updated my pack (L2j) with the latest revision (skill and effect system complete rework)

and i have these problems on CTF.java:

 

for (AbstractEffect e : summon.getAllEffects())
{
if (e != null)
{
e.exit();
}
}
 
also i've solved an error by my own but didn't test it... is it ok?

AbstractEffect eInvisible = _player.getFirstEffect(L2EffectType.HIDE);
 
to
 
AbnormalType eInvisible = AbnormalType.HIDE;

i will appreciate your help! :)

Recommended Posts

  • 0
Posted (edited)

What about changing AbstractEffect to L2Effect? Last rev of unstable or stable...?

Edited by ^Wyatt
  • 0
Posted (edited)

What about changing AbstractEffect by L2Effect? Last rev of unstable or stable...?

unstable... and L2Effect renamed with AbstractEffect..!

Edited by xXObanXx
  • 0
Posted

 

Try with

CharEffectList e : summon.getEffectList()

error (Can only iterate over an array or an instance of java.lang.Iterable)

on summon.getEffectList()

  • 0
Posted

Replace the whole loop for :
 

summon.stopAllEffects();

Finale if you want to access getEffectList(), and notably if you know it's a buff, debuff, etc, you should access it via the internal map. For instance, retrieveing all buff effect types should be called like that :

summon.getEffectList().getBuffs().values()

An important note, it returns BuffInfo type.

  • 0
Posted (edited)

Oh shit, the loop's purpose was to just stopAllEffects() ? dafuq I should start reading, just do what tryskell said.

I thought it had some checks  :rage:

Edited by ^Wyatt
  • 0
Posted (edited)

Replace the whole loop for :

 

summon.stopAllEffects();

Finale if you want to access getEffectList(), and notably if you know it's a buff, debuff, etc, you should access it via the internal map. For instance, retrieveing all buff effect types should be called like that :

summon.getEffectList().getBuffs().values()

An important note, it returns BuffInfo type.

correct me if i'm wrong... is it ok?

 

from this:

if (player.getSummon() != null)
{
L2Summon summon = player.getSummon();
for (BuffInfo e : summon.getEffectList().getEffects())
{
if (e != null)
{
e.stopAllEffects(false);
}
}

if (summon instanceof L2PetInstance)
{
summon.unSummon(player);
}
} 

to this:

if (player.getSummon() != null)
{
L2Summon summon = player.getSummon();
summon.stopAllEffects();
summon.getEffectList().getBuffs().values();

if (summon instanceof L2PetInstance)
{
summon.unSummon(player);
}
}
Edited by xXObanXx
  • 0
Posted

Haha :D.

 

About HIDE stuff, what is it supposed to do ? What is the original code, what do you want to do ?

about hide i replaced the original code with this

AbnormalType eInvisible = AbnormalType.HIDE;

(didn't test it yet)

  • 0
Posted (edited)

You probably want to do :

final L2Summon summon = player.getSummon();
if (summon != null)
{
    // Unsummon if it was a pet, otherwise clean current effects.
    if (summon.isPet())
        summon.unSummon(player);
    else
        summon.stopAllEffects();
}

- Latest L2J don't use instanceof anymore. You still can use, but well.

- No use to clean effects on pets as you unsummon them (not useful).

 

About

summon.getEffectList().getBuffs().values();

I was simply saying effects have been reworked, and now you can use preformated data (in that case, it returns current buffs effects from the summon). It hasn't to be part of your code. I just gave an exemple to retrieve active buffs effects. And btw you lacked a :

List<BuffInfo> list = summon.getEffectList().getBuffs().values();

 to store it... What you did was useless, if not worst :D.

 

About hide, I want original code and where it is used. What you did is wrong. Before the point of that code was to retrieve if player was under a HIDE effect, now you messed.

Edited by Tryskell
  • 0
Posted (edited)

 

About hide, I want original code and where it is used. What you did is wrong. Before the point of that code was to retrieve if player was under a HIDE effect, now you messed.

Original line:

L2Effect eInvisible = _player.getFirstEffect(L2EffectType.HIDE);

replaced with:

AbnormalType eInvisible = AbnormalType.HIDE;

the whole code is:

                // If player is invisible, make them visible
		if (_player.getAppearance().getInvisible())
		{
			@SuppressWarnings("unused")
			AbnormalType eInvisible = AbnormalType.HIDE;
		}
Edited by xXObanXx
  • 0
Posted

@Tryskell

I don't think it's useless to remove buffs from pets that will be unsummoned. If they didn't change it, as far as I remember... in l2jserver when you unsummon a pet, buffs are stored.

  • 0
Posted

@Tryskell

I don't think it's useless to remove buffs from pets that will be unsummoned. If they didn't change it, as far as I remember... in l2jserver when you unsummon a pet, buffs are stored.

 

It's a ctf, and that section is probably sent when character enters the event. There's no use to clean pet buffs. The only stuff to verify is the possibility to get a pet while being in ctf event (no possibility to summon).

 

@topic author, I want the use of eInvisible.

Guest
This topic is now closed to further replies.


  • Posts

    • My official facebook profile!: https://www.facebook.com/spectrumL2 Specifications: Revamped L2JACIS revision FROM the core Private project!!! Revision that has been receiving corrections for over 3 years!!! Events already installed in the revision: TVT CTF KTB PARTY FARM SPOIL EVENT CRAZY RATES TOURNAMENT TIME ZONE (INSTANCE) All working correctly!!! SIEGE ESSENTIAL FEATURES: Walls fix Gates fix Flags fix 100% functional: OLYMPIADS: Implemented settings Hero receives enchanted Weapons with equal status PvP Weapons Optional /true/false Hero can acquire all Hero Weapons Optional true/false OTHER IMPLEMENTATIONS: Teleport fixed (directly to Giran) Teleport effect classic Vip skins vip collor name Pack NPCs with effect already configured BOSES already configured Mobs already configured CLASS BALANCE SPECIAL SYSTEM We have a SPECIAL system developed for Class Balance with only 1 digit in XML %tage of configurable debuffs Player limitation system in BOSES or PvP zones BS blocking system in FLEG zones or events Among others dozens of improvements made in the review... price: 390 USD !  OBS: WE CAN CHANGE THE BANNER AND NAME OF THE SERVICE TO THE ONE OF YOUR PREFERENCE BUT THE SETTINGS MUST BE KEPT ANY CHANGES REQUIRE ADDITION        
    • Server is Online – 1,000+ Active Players! We’re excited to announce the addition of a Europe Proxy to improve connectivity for our EU players! Clans can now benefit from VIP Access to help you catch up faster. 🎯 If you're a clan leader with at least 9 active members, join our Discord and open a ticket to claim your VIP rewards!  
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
    • 📜 • Mass PVP – Craft – Progressive Server (ITEMS, ARMOR, WEAPONS, ETC) 🕹️ • Chronicles: Lineage 2 - Interlude (C6) 🛠️ • Retail status 🕒 • Server Time: GMT -3 🏙️ • Main Town: Giran ✨ • Teleportation for all Towns, Gk Global 🛡️ • NPC BUFFER - GMSHOP B-GRADE - DONATION SHOP - AUCTION MANAGER 🐉 • Epic Bosses: Chaotic Zones 🔁 • Protection respawn: 15 seconds ⏰ • Restart Server: 05:00 AM Today 💸 • RTM allowed between players (ask Staff if in doubt) 📊 SERVER RATES: • EXP: x8 • SP: x10 • Adena: x3 • Seal Stone: x3 • Drop: x3 • Spoil: x5 • Raid EXP/SP/Drop: x3 • Premium Rates: x2 🌐 Website: https://www.l2roosters.com 💬 Discord: https://discord.gg/cUyYXrfy 🔥 Join us now and forge your legacy at Roosters Gaming!
  • 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