From: Hendrik <nh...@us...> - 2007-01-07 04:41:52
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/player In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv31358/src/games/stendhal/server/entity/player Modified Files: Player.java PlayerRPClass.java Log Message: unified handling of !quests and !kills with !buddy and !ignore (moving it from Player.java to PlayerRPClass.java Index: Player.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/player/Player.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Player.java 7 Jan 2007 04:36:50 -0000 1.3 --- Player.java 7 Jan 2007 04:41:50 -0000 1.4 *************** *** 156,159 **** --- 156,160 ---- int y = player.getY(); + // load sheep try { if (player.hasSheep()) { *************** *** 198,201 **** --- 199,203 ---- zone.addPlayerAndFriends(player); + // load items String[] slotsNormal = { "bag", "rhand", "lhand", "head", "armor", "legs", "feet", "cloak", "bank" }; *************** *** 288,305 **** player.updateItemAtkDef(); - // create (or repair) !quests and !kills slots - String[] slotsWithOneObject = {"!quests", "!kills"}; - for (String slotName : slotsWithOneObject) { - if (!player.hasSlot(slotName)) { - player.addSlot(new RPSlot(slotName)); - } - RPSlot questSlot = player.getSlot(slotName); - if (!questSlot.iterator().hasNext()) { - RPObject quests = new RPObject(); - questSlot.assignValidID(quests); - questSlot.add(quests); - } - } - player.welcome(); --- 290,293 ---- Index: PlayerRPClass.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/entity/player/PlayerRPClass.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PlayerRPClass.java 7 Jan 2007 04:37:36 -0000 1.3 --- PlayerRPClass.java 7 Jan 2007 04:41:50 -0000 1.4 *************** *** 77,81 **** String[] slotsNormal = { "bag", "rhand", "lhand", "head", "armor", "legs", "feet", "cloak", "bank" }; ! String[] slotsSpecial = { "!buddy", "!ignore" }; // Port from 0.03 to 0.10 --- 77,81 ---- String[] slotsNormal = { "bag", "rhand", "lhand", "head", "armor", "legs", "feet", "cloak", "bank" }; ! String[] slotsSpecial = { "!quests", "!kills", "!buddy", "!ignore" }; // Port from 0.03 to 0.10 *************** *** 105,113 **** object.addSlot(new RPSlot(slotName)); } ! RPSlot buddy = object.getSlot(slotName); ! if (buddy.size() == 0) { ! RPObject data = new RPObject(); ! buddy.assignValidID(data); ! buddy.add(data); } } --- 105,113 ---- object.addSlot(new RPSlot(slotName)); } ! RPSlot slot = object.getSlot(slotName); ! if (slot.size() == 0) { ! RPObject singleObject = new RPObject(); ! slot.assignValidID(singleObject); ! slot.add(singleObject); } } |