Рейтинг темы:
  • 0 Голос(ов) - 0 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Проблемы с Community Board
#11
А теперь внимательно смотрим на строку
import net.sf.l2j.gameserver.model.L2Multisell; исправляем на
import com.l2jserver.gameserver.model.L2Multisell;
а теперь включаем вангу и ищем L2Multisell, которого нет естественно.
Включаем поиск и мы находим MultiSell.java ...
import com.l2jserver.gameserver.datatables.Multisell;
Дальше рассказывать или догадаетесь сами ?
СЕО Оптимизация сайтов
Ответ
#12
Что-бы не наделать ошибок - пытаюсь расковырять патч http://forum.zone-game.info/showthread.php?t=12876 и прописать все вручную.
Не хватает файла /java/com/l2jserver/gameserver/model/L2Effect.java
в него нужно было прописать:
Код:
public int getId()
    {
    return getSkill().getId();
   }
этот элемент игнорировать?

Добавлено через 5 минут
gorodetskiy Написал:А теперь внимательно смотрим на строку
import net.sf.l2j.gameserver.model.L2Multisell; исправляем на
import com.l2jserver.gameserver.model.L2Multisell;
а теперь включаем вангу и ищем L2Multisell, которого нет естественно.
Включаем поиск и мы находим MultiSell.java ...
import com.l2jserver.gameserver.datatables.Multisell;
Дальше рассказывать или догадаетесь сами ?

Понял! Спасибо. Ошибка в невнимательности.
Ответ
#13
J.O.K.E.R. Написал:Что-бы не наделать ошибок - пытаюсь расковырять патч http://forum.zone-game.info/showthread.php?t=12876 и прописать все вручную.
Не хватает файла /java/com/l2jserver/gameserver/model/L2Effect.java
в него нужно было прописать:
Код:
public int getId()
    {
    return getSkill().getId();
   }
этот элемент игнорировать?

Добавлено через 5 минут


Понял! Спасибо. Ошибка в невнимательности.

Поставь ИДУ или эклипс и не мучайся, и патч прописывать ручками, иначе всё запоришь.
СЕО Оптимизация сайтов
Ответ
#14
Пишу в эклипсе. Игнорировать /java/com/l2jserver/gameserver/model/L2Effect.java не получится, т.к. ссылка на него используется в java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java и при копмиляции фейлится.
Код:
Buildfile: C:\Users\w7\Downloads\L2J_Server\build.xml
checkRequirements:
getChangelogDateVersion:
init:
   [delete] Deleting directory C:\Users\w7\Downloads\L2J_Server\build\bin
    [mkdir] Created dir: C:\Users\w7\Downloads\L2J_Server\build\bin
dist:
     [sync] Removed 1 dangling directory from C:\Users\w7\Downloads\L2J_Server\build\dist
     [sync] Removed 9 dangling files from C:\Users\w7\Downloads\L2J_Server\build\dist
compile:
    [javac] Compiling 1661 source files to C:\Users\w7\Downloads\L2J_Server\build\bin
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:468: error: cannot find symbol
    [javac]     private void SKILL(L2PcInstance activeChar, boolean petbuff, int key, L2Skill skill)
    [javac]                                                                           ^
    [javac]   symbol:   class L2Skill
    [javac]   location: class BuffBBSManager
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\Config.java:3005: error: cannot find symbol
    [javac]                     is = new FileInputStream(new File(COMMUNITY_BOARD_PVP));
    [javac]                     ^
    [javac]   symbol:   variable is
    [javac]   location: class Config
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\Config.java:3006: error: cannot find symbol
    [javac]                     CommunityBoardPvPSettings.load(is);
    [javac]                                                    ^
    [javac]   symbol:   variable is
    [javac]   location: class Config
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\CommunityBoard.java:76: error: cannot find symbol
    [javac]                      BuffBBSManager.getInstance().parsecmd(command, activeChar);
    [javac]                      ^
    [javac]   symbol:   variable BuffBBSManager
    [javac]   location: class CommunityBoard
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\CommunityBoard.java:80: error: cannot find symbol
    [javac]                      TeleportBBSManager.getInstance().parsecmd(command, activeChar);
    [javac]                      ^
    [javac]   symbol:   variable TeleportBBSManager
    [javac]   location: class CommunityBoard
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\CommunityBoard.java:84: error: cannot find symbol
    [javac]                                         if(activeChar.isDead() || activeChar.isAlikeDead() || TvTEvent.isStarted() || activeChar.isInSiege() || activeChar.isCastingNow() || activeChar.isInCombat() || activeChar.isAttackingNow() || activeChar.isInOlympiadMode() || activeChar.isInJail() || activeChar.isFlying() || activeChar.getKarma() > 0 || activeChar.isInDuel()){
    [javac]                                                                                               ^
    [javac]   symbol:   variable TvTEvent
    [javac]   location: class CommunityBoard
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:182: error: cannot find symbol
    [javac]                 L2Skill skill;
    [javac]                 ^
    [javac]   symbol:   class L2Skill
    [javac]   location: class BuffBBSManager
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:214: error: cannot find symbol
    [javac]             L2Skill skill;
    [javac]             ^
    [javac]   symbol:   class L2Skill
    [javac]   location: class BuffBBSManager
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:252: error: cannot find symbol
    [javac]             L2Skill skill;
    [javac]             ^
    [javac]   symbol:   class L2Skill
    [javac]   location: class BuffBBSManager
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:290: error: cannot find symbol
    [javac]             L2Skill skill;
    [javac]             ^
    [javac]   symbol:   class L2Skill
    [javac]   location: class BuffBBSManager
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:328: error: cannot find symbol
    [javac]             L2Skill skill;
    [javac]             ^
    [javac]   symbol:   class L2Skill
    [javac]   location: class BuffBBSManager
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:379: error: cannot find symbol
    [javac]                                     L2Skill skill = SkillTable.getInstance().getInfo(allskillid_1[i][0], skilllevel);
    [javac]                                     ^
    [javac]   symbol:   class L2Skill
    [javac]   location: class BuffBBSManager
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:389: error: cannot find symbol
    [javac]                                 L2Skill skill = SkillTable.getInstance().getInfo(allskillid_1[i][0], skilllevel);
    [javac]                                 ^
    [javac]   symbol:   class L2Skill
    [javac]   location: class BuffBBSManager
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:409: error: cannot find symbol
    [javac]                                 L2Skill skill = SkillTable.getInstance().getInfo(allskillid_1[i][0], skilllevel);
    [javac]                                 ^
    [javac]   symbol:   class L2Skill
    [javac]   location: class BuffBBSManager
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:418: error: cannot find symbol
    [javac]                             L2Skill skill = SkillTable.getInstance().getInfo(allskillid_1[i][0], skilllevel);
    [javac]                             ^
    [javac]   symbol:   class L2Skill
    [javac]   location: class BuffBBSManager
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:504: error: cannot find symbol
    [javac]                 L2Effect skill[] = activeChar.getAllEffects();
    [javac]                 ^
    [javac]   symbol:   class L2Effect
    [javac]   location: class BuffBBSManager
    [javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\gameserver\communitybbs\Manager\BuffBBSManager.java:544: error: cannot find symbol
    [javac]                 L2Effect skill[] = activeChar.getPet().getAllEffects();
    [javac]                 ^
    [javac]   symbol:   class L2Effect
    [javac]   location: class BuffBBSManager
    [javac] 17 errors

BUILD FAILED
C:\Users\w7\Downloads\L2J_Server\build.xml:64: Compile failed; see the compiler error output for details.

Total time: 51 seconds
Что посоветуете?
Ответ
#15
Перейти к классу и повнимательней посмотреть на ошибку ( в эклипсе всё подсвечивается )
СЕО Оптимизация сайтов
Ответ
#16
нашел L2Effect.java в /java/com/l2jserver/gameserver/model/effect/L2Effect.java
попробую туда запилить по аналогии
Код:
Index: /java/com/l2jserver/gameserver/model/L2Effect.java
===================================================================
--- /java/com/l2jserver/gameserver/model/L2Effect.java    (revision 4510)
+++ /java/com/l2jserver/gameserver/model/L2Effect.java    (working copy)
@@ -663,4 +663,9 @@
    {
        return false;
    }
+    
+    public int getId()
+    {
+    return getSkill().getId();
+    }
}
\ No newline at end of file

Добавлено через 2 минуты
только не знаю куда именно

Добавлено через 2 минуты
Код:
/*
* 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.l2jserver.gameserver.model.effects;

import java.util.ArrayList;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;

import com.l2jserver.gameserver.GameTimeController;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.datatables.SkillTable;
import com.l2jserver.gameserver.model.ChanceCondition;
import com.l2jserver.gameserver.model.IChanceSkillTrigger;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.actor.instance.L2ServitorInstance;
import com.l2jserver.gameserver.model.skills.L2Skill;
import com.l2jserver.gameserver.model.skills.L2SkillType;
import com.l2jserver.gameserver.model.skills.funcs.Func;
import com.l2jserver.gameserver.model.skills.funcs.FuncTemplate;
import com.l2jserver.gameserver.model.skills.funcs.Lambda;
import com.l2jserver.gameserver.model.stats.Env;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.serverpackets.AbnormalStatusUpdate;
import com.l2jserver.gameserver.network.serverpackets.ExOlympiadSpelledInfo;
import com.l2jserver.gameserver.network.serverpackets.MagicSkillLaunched;
import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse;
import com.l2jserver.gameserver.network.serverpackets.PartySpelled;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;

/**
* This class ...
*
* @version $Revision: 1.1.2.1.2.12 $ $Date: 2005/04/11 10:06:07 $
*/
public abstract class L2Effect implements IChanceSkillTrigger
{
    protected static final Logger _log = Logger.getLogger(L2Effect.class.getName());
    
    private static final Func[] _emptyFunctionSet = new Func[0];
    
    //member _effector is the instance of L2Character that cast/used the spell/skill that is
    //causing this effect.  Do not confuse with the instance of L2Character that
    //is being affected by this effect.
    private final L2Character _effector;
    
    //member _effected is the instance of L2Character that was affected
    //by this effect.  Do not confuse with the instance of L2Character that
    //casted/used this effect.
    private final L2Character _effected;
    
    //the skill that was used.
    private final L2Skill _skill;
    
    private final boolean _isHerbEffect;
    
    //or the items that was used.
    //private final L2Item _item;
    
    // the value of an update
    private final Lambda _lambda;
    
    // the current state
    private EffectState _state;
    
    // period, seconds
    private final int _abnormalTime;
    protected int _periodStartTicks;
    protected int _periodFirstTime;
    
    private final EffectTemplate _template;
    
    // function templates
    private final FuncTemplate[] _funcTemplates;
    
    //initial count
    private final int _totalCount;
    // counter
    private int _count;
    
    // abnormal effect mask
    private final AbnormalEffect _abnormalEffect;
    // special effect mask
    private final AbnormalEffect[] _specialEffect;
    // event effect mask
    private final AbnormalEffect _eventEffect;
    // show icon
    private final boolean _icon;
    // is self effect?
    private boolean _isSelfEffect = false;
    // is passive effect?
    private boolean _isPassiveEffect = false;

    public boolean preventExitUpdate;
    
    protected final class EffectTask implements Runnable
    {
        @Override
        public void run()
        {
            try
            {
                _periodFirstTime = 0;
                _periodStartTicks = GameTimeController.getGameTicks();
                scheduleEffect();
            }
            catch (Exception e)
            {
                _log.log(Level.SEVERE, "", e);
            }
        }
    }
    
    private ScheduledFuture<?> _currentFuture;
    
    /** The Identifier of the stack group */
    private final String _abnormalType;
    
    /** The position of the effect in the stack group */
    private final byte _abnormalLvl;
    
    private boolean _inUse = false;
    private boolean _startConditionsCorrect = true;
    
    /**
     * For special behavior. See Formulas.calcEffectSuccess
     */
    private double _effectPower;
    private L2SkillType _effectSkillType;
    
    /**
     * <font color="FF0000"><b>WARNING: scheduleEffect no longer inside constructor</b></font><br>
     * So you must call it explicitly
     * @param env
     * @param template
     */
    protected L2Effect(Env env, EffectTemplate template)
    {
        _state = EffectState.CREATED;
        _skill = env.getSkill();
        //_item = env._item == null ? null : env._item.getItem();
        _template = template;
        _effected = env.getTarget();
        _effector = env.getCharacter();
        _lambda = template.lambda;
        _funcTemplates = template.funcTemplates;
        _count = template.counter;
        _totalCount = _count;
        
        // Support for retail herbs duration when _effected has a Summon
        int temp = template.abnormalTime;
        
        if ((_skill.getId() > 2277 && _skill.getId() < 2286) || (_skill.getId() >= 2512 && _skill.getId() <= 2514))
        {
            if (_effected instanceof L2ServitorInstance ||
                    (_effected instanceof L2PcInstance && ((L2PcInstance) _effected).getPet() instanceof L2ServitorInstance))
            {
                temp /= 2;
            }
        }
        
        if (env.isSkillMastery())
            temp *= 2;
        
        _abnormalTime = temp;
        _abnormalEffect = template.abnormalEffect;
        _specialEffect = template.specialEffect;
        _eventEffect = template.eventEffect;
        _abnormalType = template.abnormalType;
        _abnormalLvl = template.abnormalLvl;
        _periodStartTicks = GameTimeController.getGameTicks();
        _periodFirstTime = 0;
        _icon = template.icon;
        _effectPower = template.effectPower;
        _effectSkillType = template.effectType;

        _isHerbEffect = _skill.getName().contains("Herb");

        /*
         * Commented out by DrHouse:
         * scheduleEffect can call onStart before effect is completly
         * initialized on constructor (child classes constructor)
         */
        //scheduleEffect();
    }
    
    /**
     * Special constructor to "steal" buffs. Must be implemented on
     * every child class that can be stolen.<br><br>
     *
     * <font color="FF0000"><b>WARNING: scheduleEffect nolonger inside constructor</b></font>
     * <br>So you must call it explicitly
     * @param env
     * @param effect
     */
    protected L2Effect(Env env, L2Effect effect)
    {
        _template = effect._template;
        _state = EffectState.CREATED;
        _skill = env.getSkill();
        _effected = env.getTarget();
        _effector = env.getCharacter();
        _lambda = _template.lambda;
        _funcTemplates = _template.funcTemplates;
        _count = effect.getCount();
        _totalCount = _template.counter;
        _abnormalTime = _template.abnormalTime;
        _abnormalEffect = _template.abnormalEffect;
        _specialEffect = _template.specialEffect;
        _eventEffect = _template.eventEffect;
        _abnormalType = _template.abnormalType;
        _abnormalLvl = _template.abnormalLvl;
        _periodStartTicks = effect.getPeriodStartTicks();
        _periodFirstTime = effect.getTime();
        _icon = _template.icon;
        
        _isHerbEffect = _skill.getName().contains("Herb");

        /*
         * Commented out by DrHouse:
         * scheduleEffect can call onStart before effect is completly
         * initialized on constructor (child classes constructor)
         */
        //scheduleEffect();
    }
    
    public int getCount()
    {
        return _count;
    }
    
    public int getTotalCount()
    {
        return _totalCount;
    }
    
    public void setCount(int newcount)
    {
        _count = Math.min(newcount, _totalCount); // sanity check
    }

    public void setFirstTime(int newFirstTime)
    {
        _periodFirstTime = Math.min(newFirstTime, _abnormalTime);
        _periodStartTicks -= _periodFirstTime * GameTimeController.TICKS_PER_SECOND;
    }

    public boolean getShowIcon()
    {
        return _icon;
    }
    
    public int getAbnormalTime()
    {
        return _abnormalTime;
    }
    
    public int getTime()
    {
        return (GameTimeController.getGameTicks() - _periodStartTicks) / GameTimeController.TICKS_PER_SECOND;
    }
    
    /**
     * Returns the elapsed time of the task.
     * @return Time in seconds.
     */
    public int getTaskTime()
    {
        if (_count == _totalCount)
            return 0;
        return (Math.abs(_count - _totalCount + 1) * _abnormalTime) + getTime() + 1;
    }
    
    public boolean getInUse()
    {
        return _inUse;
    }
    
    public boolean setInUse(boolean inUse)
    {
        _inUse = inUse;
        if (_inUse)
            _startConditionsCorrect = onStart();
        else
            onExit();
        
        return _startConditionsCorrect;
    }
    
    public String getAbnormalType()
    {
        return _abnormalType;
    }
    
    public byte getAbnormalLvl()
    {
        return _abnormalLvl;
    }
    
    public final L2Skill getSkill()
    {
        return _skill;
    }
    
    public final L2Character getEffector()
    {
        return _effector;
    }
    
    public final L2Character getEffected()
    {
        return _effected;
    }
    
    public boolean isSelfEffect()
    {
        return _isSelfEffect;
    }
    
    public void setSelfEffect()
    {
        _isSelfEffect = true;
    }
    
    public boolean isPassiveEffect()
    {
        return _isPassiveEffect;
    }
    
    public void setPassiveEffect()
    {
        _isPassiveEffect = true;
    }
    
    public boolean isHerbEffect()
    {
        return _isHerbEffect;
    }
    
    public final double calc()
    {
        Env env = new Env();
        env.setCharacter(_effector);
        env.setTarget(_effected);
        env.setSkill(_skill);
        return _lambda.calc(env);
    }
    
    private final synchronized void startEffectTask()
    {
        if (_abnormalTime > 0)
        {
            stopEffectTask();
            final int initialDelay = Math.max((_abnormalTime - _periodFirstTime) * 1000, 5);
            if (_count > 1)
                _currentFuture = ThreadPoolManager.getInstance().scheduleEffectAtFixedRate(new EffectTask(), initialDelay, _abnormalTime * 1000);
            else
                _currentFuture = ThreadPoolManager.getInstance().scheduleEffect(new EffectTask(), initialDelay);
        }
        if (_state == EffectState.ACTING)
        {
            if (isSeflEffectType())
                _effector.addEffect(this);
            else
                _effected.addEffect(this);
        }
    }
    
    /**
     * Stop the L2Effect task and send Server->Client update packet.<BR><BR>
     *
     * <B><U> Actions</U> :</B><BR><BR>
     * <li>Cancel the effect in the the abnormal effect map of the L2Character </li>
     * <li>Stop the task of the L2Effect, remove it and update client magic icon </li><BR><BR>
     *
     */
    public final void exit()
    {
        exit(false);
    }
    
    public final void exit(boolean preventUpdate)
    {
        preventExitUpdate = preventUpdate;
        _state = EffectState.FINISHING;
        scheduleEffect();
    }
    
    /**
     * Stop the task of the L2Effect, remove it and update client magic icon.<BR><BR>
     *
     * <B><U> Actions</U> :</B><BR><BR>
     * <li>Cancel the task </li>
     * <li>Stop and remove L2Effect from L2Character and update client magic icon </li><BR><BR>
     *
     */
    public final synchronized void stopEffectTask()
    {
        if (_currentFuture != null)
        {
            // Cancel the task
            _currentFuture.cancel(false);
            //ThreadPoolManager.getInstance().removeEffect(_currentTask);
            
            _currentFuture = null;
            
            if (isSeflEffectType() && getEffector() != null)
                getEffector().removeEffect(this);
            else if (getEffected() != null)
                getEffected().removeEffect(this);
        }
    }
    
    /**
     * @return effect type
     */
    public abstract L2EffectType getEffectType();
    
    /**
     * Notify started
     * @return
     */
    public boolean onStart()
    {
        if (_abnormalEffect != AbnormalEffect.NULL)
            getEffected().startAbnormalEffect(_abnormalEffect);
        if (_specialEffect != null)
            getEffected().startSpecialEffect(_specialEffect);
        if (_eventEffect != AbnormalEffect.NULL && getEffected() instanceof L2PcInstance)
            getEffected().getActingPlayer().startEventEffect(_eventEffect);
        return true;
    }
    
    /**
     * Cancel the effect in the the abnormal effect map of the effected L2Character.<BR><BR>
     */
    public void onExit()
    {
        if (_abnormalEffect != AbnormalEffect.NULL)
            getEffected().stopAbnormalEffect(_abnormalEffect);
        if (_specialEffect != null)
            getEffected().stopSpecialEffect(_specialEffect);
        if (_eventEffect != AbnormalEffect.NULL && getEffected() instanceof L2PcInstance)
            getEffected().getActingPlayer().stopEventEffect(_eventEffect);
    }
    
    /**
     * @return true for continuation of this effect
     */
    public abstract boolean onActionTime();
    
    public final void scheduleEffect()
    {
        switch (_state)
        {
            case CREATED:
            {
                _state = EffectState.ACTING;
                
                if (_skill.isPvpSkill() && _icon && getEffected() instanceof L2PcInstance)
                {
                    SystemMessage smsg = SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT);
                    smsg.addSkillName(_skill);
                    getEffected().sendPacket(smsg);
                }

                if (_abnormalTime != 0)
                {
                    startEffectTask();
                    return;
                }
                // effects not having count or period should start
                _startConditionsCorrect = onStart();
            }
            case ACTING:
            {
                if (_count > 0)
                {
                    _count--;
                    if (getInUse())
                    { // effect has to be in use
                        if (onActionTime() && _startConditionsCorrect && _count > 0)
                            return; // false causes effect to finish right away
                    }
                    else if (_count > 0)
                    { // do not finish it yet, in case reactivated
                        return;
                    }
                }
                _state = EffectState.FINISHING;
            }
            case FINISHING:
            {
                //If the time left is equal to zero, send the message
                if (_count == 0 && _icon && getEffected() instanceof L2PcInstance)
                {
                    SystemMessage smsg3 = SystemMessage.getSystemMessage(SystemMessageId.S1_HAS_WORN_OFF);
                    smsg3.addSkillName(_skill);
                    getEffected().sendPacket(smsg3);
                }
                // if task is null - stopEffectTask does not remove effect
                if (_currentFuture == null && getEffected() != null)
                {
                    getEffected().removeEffect(this);
                }
                // Stop the task of the L2Effect, remove it and update client magic icon
                stopEffectTask();
                
                // Cancel the effect in the the abnormal effect map of the L2Character
                if (getInUse() || !(_count > 1 || _abnormalTime > 0))
                    if (_startConditionsCorrect)
                        onExit();
                
                if (_skill.getAfterEffectId() > 0)
                {
                    L2Skill skill = SkillTable.getInstance().getInfo(_skill.getAfterEffectId(), _skill.getAfterEffectLvl());
                    if (skill != null)
                    {
                        getEffected().broadcastPacket(new MagicSkillUse(_effected, skill.getId(), skill.getLevel(), 0, 0));
                        getEffected().broadcastPacket(new MagicSkillLaunched(_effected, skill.getId(), skill.getLevel()));
                        skill.getEffects(getEffected(), getEffected());
                    }
                }
            }
        }
    }
    
    public Func[] getStatFuncs()
    {
        if (_funcTemplates == null)
            return _emptyFunctionSet;
        
        final ArrayList<Func> funcs = new ArrayList<>(_funcTemplates.length);
        
        Env env = new Env();
        env.setCharacter(_effector);
        env.setTarget(_effected);
        env.setSkill(_skill);
        
        Func f;
        for (FuncTemplate t : _funcTemplates)
        {
            f = t.getFunc(env, this); // effect is owner
            if (f != null)
                funcs.add(f);
        }
        
        if (funcs.isEmpty())
        {
            return _emptyFunctionSet;
        }
        return funcs.toArray(new Func[funcs.size()]);
    }
    
    public final void addIcon(AbnormalStatusUpdate mi)
    {
        if (_state != EffectState.ACTING)
            return;

        final ScheduledFuture<?> future = _currentFuture;
        final L2Skill sk = getSkill();
        if (_totalCount > 1)
        {
            if (sk.isStatic())
                mi.addEffect(sk.getDisplayId(), getLevel(), sk.getBuffDuration() - (getTaskTime() * 1000));
            else
                mi.addEffect(sk.getDisplayId(), getLevel(), -1);
        }
        else if (future != null)
            mi.addEffect(sk.getDisplayId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
        else if (_abnormalTime == -1)
            mi.addEffect(sk.getDisplayId(), getLevel(), _abnormalTime);
    }
    
    public final void addPartySpelledIcon(PartySpelled ps)
    {
        if (_state != EffectState.ACTING)
            return;

        final ScheduledFuture<?> future = _currentFuture;
        final L2Skill sk = getSkill();
        if (future != null)
            ps.addPartySpelledEffect(sk.getDisplayId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
        else if (_abnormalTime == -1)
            ps.addPartySpelledEffect(sk.getDisplayId(), getLevel(), _abnormalTime);
    }
    
    public final void addOlympiadSpelledIcon(ExOlympiadSpelledInfo os)
    {
        if (_state != EffectState.ACTING)
            return;

        final ScheduledFuture<?> future = _currentFuture;
        final L2Skill sk = getSkill();
        if (future != null)
            os.addEffect(sk.getDisplayId(), getLevel(), (int) future.getDelay(TimeUnit.MILLISECONDS));
        else if (_abnormalTime == -1)
            os.addEffect(sk.getDisplayId(), getLevel(), _abnormalTime);
    }
    
    public int getLevel()
    {
        return getSkill().getLevel();
    }

    public int getPeriodStartTicks()
    {
        return _periodStartTicks;
    }

    public EffectTemplate getEffectTemplate()
    {
        return _template;
    }
    
    public double getEffectPower()
    {
        return _effectPower;
    }
    
    public L2SkillType getSkillType()
    {
        return _effectSkillType;
    }
    
    public boolean canBeStolen()
    {
        if(!effectCanBeStolen()
                || getEffectType() == L2EffectType.TRANSFORMATION
                || getSkill().isPassive()
                || getSkill().isToggle()
                || getSkill().isDebuff()
                || getSkill().isHeroSkill()
                || getSkill().isGMSkill()
                || getSkill().isStatic()
                || !getSkill().canBeDispeled())
            return false;
        return true;
    }

    /**
     * @return {@code true} if effect itself can be stolen, {@code false} otherwise
     */
    protected boolean effectCanBeStolen()
    {
        return false;
    }

    /**
     * Return bit flag for current effect
     * @return int flag
     */
    public int getEffectFlags()
    {
        return 0;
    }
    
    @Override
    public String toString()
    {
        return "L2Effect [_skill=" + _skill + ", _state=" + _state + ", _period=" + _abnormalTime + "]";
    }
    
    public boolean isSeflEffectType()
    {
        return false;
    }
    
    public void decreaseForce()
    {
    }
    
    public void increaseEffect()
    {
    }
    
    public int getForceEffect()
    {
        return 0;
    }
    
    public boolean isBuffEffect()
    {
        return false;
    }
    
    public boolean isDebuffEffect()
    {
        return false;
    }
    
    @Override
    public boolean triggersChanceSkill()
    {
        return false;
    }
    
    @Override
    public int getTriggeredChanceId()
    {
        return 0;
    }
    
    @Override
    public int getTriggeredChanceLevel()
    {
        return 0;
    }
    
    @Override
    public ChanceCondition getTriggeredChanceCondition()
    {
        return null;
    }
}
Ответ
#17
[javac] C:\Users\w7\Downloads\L2J_Server\java\com\l2jserver\Config.java:3005: error: cannot find symbol
[javac] is = new FileInputStream(new File(COMMUNITY_BOARD_PVP));
[javac] ^
[javac] symbol: variable is
[javac] location: class Config

В упор ни в ядре, ни в патче не вижу строки
is = new FileInputStream(new File(COMMUNITY_BOARD_PVP));
Может я ослеп ?
СЕО Оптимизация сайтов
Ответ
#18
вот, в патче в самом начале было:
Код:
Index: /java/com/l2jserver/Config.java
===================================================================
--- /java/com/l2jserver/Config.java    (revision 4510)
+++ /java/com/l2jserver/Config.java    (working copy)
@@ -80,6 +80,7 @@
    public static final String COMMUNITY_CONFIGURATION_FILE = "./config/CommunityServer.properties";
    public static final String GRANDBOSS_CONFIG_FILE = "./config/Grandboss.properties";
    public static final String GRACIASEEDS_CONFIG_FILE = "./config/GraciaSeeds.properties";
+    public static final String COMMUNITY_BOARD_PVP = "./config/CommunityBoardPvP.properties";
    public static final String CHAT_FILTER_FILE = "./config/chatfilter.txt";
    
    
@@ -600,6 +601,13 @@
    
    
    //--------------------------------------------------
+    // Community Board PvP
+    //--------------------------------------------------
+    public static boolean BUFF_PEACE;
+    public static boolean MANI_BUFF;
+    
+    
+    //--------------------------------------------------
    // FloodProtector Settings
    //--------------------------------------------------
    public static FloodProtectorConfig FLOOD_PROTECTOR_USE_ITEM;
@@ -2690,6 +2698,23 @@
                    throw new Error("Failed to Load " + GRANDBOSS_CONFIG_FILE + " File.");
                }
                
+                    // Community Board PvP
+                    try
+                    {
+                    L2Properties CommunityBoardPvPSettings = new L2Properties();
+                    is = new FileInputStream(new File(COMMUNITY_BOARD_PVP));
+                    CommunityBoardPvPSettings.load(is);
+                    
+                    BUFF_PEACE = Boolean.parseBoolean(CommunityBoardPvPSettings.getProperty("PeaceZone", "true"));
+                    MANI_BUFF = Boolean.parseBoolean(CommunityBoardPvPSettings.getProperty("ManiBuff", "true"));
+                    
+                    }
+                    catch (Exception e)
+                    {
+                    e.printStackTrace();
+                    throw new Error("Failed to Load " + COMMUNITY_BOARD_PVP + " File.");
+                    }
+                
                // Gracia Seeds
                try
                {
Ответ
#19
http://www.l2jserver.com/forum/viewtopic...63cd38976c
http://clip2net.com/s/2dQCQ
По ходу у меня что то со зрением ...
СЕО Оптимизация сайтов
Ответ
#20
ну, там нету)
http://forum.zone-game.info/showthread.php?t=12876 - тут брал
Ответ


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Проблемы с полосками HP и MP у саммонеров. Magican 0 856 09-19-2022, 05:03 AM
Последний пост: Magican
  В поиске редкой проблемы ivashk 9 1,451 01-18-2021, 10:49 AM
Последний пост: ivashk
  Проблемы с импортом в квестах на сборке Open-Team devset 2 2,742 02-02-2020, 06:26 PM
Последний пост: Bonabo
  Проблемы с заливкой таблиц в бд l2jserver HF dbinst_gs a6y 3 1,899 10-08-2017, 11:01 PM
Последний пост: a6y
  Проблемы с работоспособностью города Deaspara 22 5,360 08-24-2016, 07:11 PM
Последний пост: Kensiro
  Проблемы с установкой баффера michail_ST 15 3,252 04-17-2016, 09:51 AM
Последний пост: michail_ST
  Проблемы с Гео при запуске GameServer Scream 17 4,449 04-04-2016, 08:19 AM
Последний пост: HiredKiller
  community tablichka 12 8,243 01-23-2016, 06:31 PM
Последний пост: grabedinex
  Community Server YuLs 8 3,840 01-22-2016, 08:09 PM
Последний пост: Yakuza
  Community Board задержка mego4el 6 1,653 12-01-2015, 07:19 PM
Последний пост: Zubastic

Перейти к форуму:


Пользователи, просматривающие эту тему: 6 Гость(ей)