Ignore:
Timestamp:
Jan 16, 2012 7:56:19 AM (4 months ago)
Author:
MELERIX
Message:

STABLE: Sync with BETA [8629]

Location:
trunk/L2J_DataPack
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/L2J_DataPack

  • trunk/L2J_DataPack/dist/game/data/scripts/events/TheValentineEvent/TheValentineEvent.java

    r7772 r8630  
    1515package events.TheValentineEvent; 
    1616 
    17 import com.l2jserver.gameserver.instancemanager.QuestManager; 
     17import com.l2jserver.gameserver.model.Location; 
    1818import com.l2jserver.gameserver.model.actor.L2Npc; 
    1919import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; 
     
    2222import com.l2jserver.gameserver.model.quest.State; 
    2323 
    24  
    2524/** 
    26  * Event Code for "The Valentine Event" 
     25 * Event Code for "The Valentine Event"<br> 
    2726 * http://www.lineage2.com/archive/2009/01/the_valentine_e.html 
    28  * @author  Gnat 
     27 * @author Gnacik 
    2928 */ 
    3029public class TheValentineEvent extends Quest 
    3130{ 
    32         private static final int _npc           = 4301; 
    33         private static final int _recipe        = 20191; 
     31        private static final int _npc = 4301; 
     32        private static final int _recipe = 20191; 
    3433         
    35         private static final int[][] _spawns = 
     34        private static final Location[] _spawns = 
    3635        { 
    37                 {87792,-142240,-1343,44000}, 
    38                 {87616,-140688,-1542,16500}, 
    39                 {114733,-178691,-821,0}, 
    40                 {115708,-182362,-1449,0}, 
    41                 {-44337,-113669,-224,0}, 
    42                 {-44628,-115409,-240,22500}, 
    43                 {-13073,122801,-3117,0}, 
    44                 {-13949,121934,-2988,32768}, 
    45                 {-14822,123708,-3117,8192}, 
    46                 {-80762,151118,-3043,28672}, 
    47                 {-84049,150176,-3129,4096}, 
    48                 {-82623,151666,-3129,49152}, 
    49                 {-84516,242971,-3730,34000}, 
    50                 {-86003,243205,-3730,60000}, 
    51                 {11281,15652,-4584,25000}, 
    52                 {11303,17732,-4574,57344}, 
    53                 {47151,49436,-3059,32000}, 
    54                 {79806,55570,-1560,0}, 
    55                 {83328,55824,-1525,32768}, 
    56                 {80986,54504,-1525,32768}, 
    57                 {18178,145149,-3054,7400}, 
    58                 {19208,144380,-3097,32768}, 
    59                 {19508,145775,-3086,48000}, 
    60                 {17396,170259,-3507,30000}, 
    61                 {83332,149160,-3405,49152}, 
    62                 {82277,148598,-3467,0}, 
    63                 {81621,148725,-3467,32768}, 
    64                 {81680,145656,-3533,32768}, 
    65                 {117498,76630,-2695,38000}, 
    66                 {115914,76449,-2711,59000}, 
    67                 {119536,76988,-2275,40960}, 
    68                 {147120,27312,-2192,40960}, 
    69                 {147920,25664,-2000,16384}, 
    70                 {111776,221104,-3543,16384}, 
    71                 {107904,218096,-3675,0}, 
    72                 {114920,220020,-3632,32768}, 
    73                 {147888,-58048,-2979,49000}, 
    74                 {147285,-56461,-2776,11500}, 
    75                 {44176,-48732,-800,33000}, 
    76                 {44294,-47642,-792,50000}, 
    77                 {-116677,46824,360,34828} 
     36                new Location(87792, -142240, -1343, 44000), 
     37                new Location(87616, -140688, -1542, 16500), 
     38                new Location(114733, -178691, -821, 0), 
     39                new Location(115708, -182362, -1449, 0), 
     40                new Location(-44337, -113669, -224, 0), 
     41                new Location(-44628, -115409, -240, 22500), 
     42                new Location(-13073, 122801, -3117, 0), 
     43                new Location(-13949, 121934, -2988, 32768), 
     44                new Location(-14822, 123708, -3117, 8192), 
     45                new Location(-80762, 151118, -3043, 28672), 
     46                new Location(-84049, 150176, -3129, 4096), 
     47                new Location(-82623, 151666, -3129, 49152), 
     48                new Location(-84516, 242971, -3730, 34000), 
     49                new Location(-86003, 243205, -3730, 60000), 
     50                new Location(11281, 15652, -4584, 25000), 
     51                new Location(11303, 17732, -4574, 57344), 
     52                new Location(47151, 49436, -3059, 32000), 
     53                new Location(79806, 55570, -1560, 0), 
     54                new Location(83328, 55824, -1525, 32768), 
     55                new Location(80986, 54504, -1525, 32768), 
     56                new Location(18178, 145149, -3054, 7400), 
     57                new Location(19208, 144380, -3097, 32768), 
     58                new Location(19508, 145775, -3086, 48000), 
     59                new Location(17396, 170259, -3507, 30000), 
     60                new Location(83332, 149160, -3405, 49152), 
     61                new Location(82277, 148598, -3467, 0), 
     62                new Location(81621, 148725, -3467, 32768), 
     63                new Location(81680, 145656, -3533, 32768), 
     64                new Location(117498, 76630, -2695, 38000), 
     65                new Location(115914, 76449, -2711, 59000), 
     66                new Location(119536, 76988, -2275, 40960), 
     67                new Location(147120, 27312, -2192, 40960), 
     68                new Location(147920, 25664, -2000, 16384), 
     69                new Location(111776, 221104, -3543, 16384), 
     70                new Location(107904, 218096, -3675, 0), 
     71                new Location(114920, 220020, -3632, 32768), 
     72                new Location(147888, -58048, -2979, 49000), 
     73                new Location(147285, -56461, -2776, 11500), 
     74                new Location(44176, -48732, -800, 33000), 
     75                new Location(44294, -47642, -792, 50000), 
     76                new Location(-116677, 46824, 360, 34828) 
    7877        }; 
    7978         
     
    8483                addFirstTalkId(_npc); 
    8584                addTalkId(_npc); 
    86                 for(int[] _spawn : _spawns) 
    87                         addSpawn(_npc, _spawn[0], _spawn[1], _spawn[2], _spawn[3], false, 0); 
     85                for (Location loc : _spawns) 
     86                { 
     87                        addSpawn(_npc, loc, false, 0); 
     88                } 
    8889        } 
    8990         
     
    9192        public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) 
    9293        { 
    93                 String htmltext = ""; 
     94                String htmltext = event; 
    9495                QuestState st = player.getQuestState(getName()); 
    95                  
    96                 htmltext = event; 
    97                 if(event.equalsIgnoreCase("4301-3.htm")) 
     96                if (event.equalsIgnoreCase("4301-3.htm")) 
    9897                { 
    99                         if(st.getState() == State.COMPLETED) 
     98                        if (st.isCompleted()) 
    10099                        { 
    101100                                htmltext = "4301-4.htm"; 
     
    114113        public String onFirstTalk(L2Npc npc, L2PcInstance player) 
    115114        { 
    116                 String htmltext = ""; 
    117115                QuestState st = player.getQuestState(getName()); 
    118116                if (st == null) 
    119117                { 
    120                         Quest q = QuestManager.getInstance().getQuest(getName()); 
    121                         st = q.newQuestState(player); 
     118                        st = newQuestState(player); 
    122119                } 
    123                 htmltext = npc.getNpcId() + ".htm"; 
    124                 return htmltext; 
     120                return npc.getNpcId() + ".htm"; 
    125121        } 
    126122         
Note: See TracChangeset for help on using the changeset viewer.