|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.combat.XPAwards
Handles computation of individual and group XP for a kill.
Field Summary | |
static java.lang.String |
MYCLASS
|
Method Summary | |
static int |
adjustXPByLevel(int xp,
int level1,
int level2)
Does an adjustment of the XP award based on the relative levels of the attacker and defender. |
static java.util.List |
awardExperience(Player attacker,
Attackable target)
Awards the experience for the kill to the attacker (and any group members present, if applicable). |
static java.util.List |
awardGroupXP(PlayerGroups.Group g,
Attackable target,
int xp,
DamageEvent event)
Awards XP to an entire group. |
static void |
awardGuildXP(Player member,
DamageEvent event)
Awards guild experience for the kill. |
static void |
awardIndividualXP(Attackable target,
Player attacker,
DamageEvent event,
int xp)
Awards XP to a non-grouped individual. |
static void |
awardXPForPlayer(Player winner,
Damageable target)
Figures out if a player who killed something should get all the XP, or share it with other group members. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String MYCLASS
Method Detail |
public static void awardXPForPlayer(Player winner, Damageable target)
winner
- the player who killed the thingtarget
- the thing that got killed/destroyedpublic static java.util.List awardExperience(Player attacker, Attackable target)
attacker
- the one who dealt the final blowtarget
- the thing that got destroyed. It has
the damage event stored in a "fatal-event" property
(a DamageEvent produced by DamageCommand). If the
target was killed instantly, e.g. by a death ray or fear,
the "fatal-event" property is a DeathEvent.
public static void awardIndividualXP(Attackable target, Player attacker, DamageEvent event, int xp)
public static java.util.List awardGroupXP(PlayerGroups.Group g, Attackable target, int xp, DamageEvent event)
g
- the group the attacker is intarget
- the target that was killedpublic static int adjustXPByLevel(int xp, int level1, int level2)
xp
- the proposed amount of xp to awardlevel1
- attacker's levellevel2
- defender's level
public static void awardGuildXP(Player member, DamageEvent event)
member
- a group member who's getting some experience -
could be the player who actually killed the monster, or not.event
- the DamageEvent - see comments in
wyvern.lib.properties.GuildSkills.awardXP() for details
on the properties set in the event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |