Skip to content

Commit 8488bdc

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents ca34b9c + 1cb8515 commit 8488bdc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/main/java/io/luna/game/model/mob/combat/CombatDamageStack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public CombatDamageStack(Mob mob) {
4848
* @param damage The damage entry to buffer.
4949
*/
5050
public void push(Mob source, CombatDamage damage) {
51-
if (mob.equals(source)) {
51+
if (!mob.equals(source)) {
5252
buffer.put(source, damage);
5353
}
5454
}

src/main/kotlin/api/api/combat/death/DeathHookHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ object DeathHookHandler {
104104
* @param source The [Mob] responsible for the kill.
105105
* @param stage The current [DeathStage] of the death sequence.
106106
*/
107-
fun onDeath(victim: Mob, source: Mob, stage: DeathStage) {
107+
fun onDeath(victim: Mob, source: Mob?, stage: DeathStage) {
108108
if (victim is Npc) {
109109
val receiver = DeathHookReceiver(victim, source, stage)
110110
val lookup = npcHooks[victim.id]

src/main/kotlin/api/api/combat/death/dsl/DeathHookReceiver.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import io.luna.game.model.mob.MobDeathTask.DeathStage
4141
* @property source The entity responsible for causing the death.
4242
* @property stage The current death stage ([DeathStage.PRE_DEATH], [DeathStage.DEATH], [DeathStage.POST_DEATH]).
4343
*/
44-
class DeathHookReceiver<T : Mob>(val victim: T, val source: Mob, private val stage: DeathStage) {
44+
class DeathHookReceiver<T : Mob>(val victim: T, val source: Mob?, private val stage: DeathStage) {
4545

4646
/**
4747
* Executes logic during the pre-death stage. This block runs before the entity officially dies.

0 commit comments

Comments
 (0)