mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-09 04:32:53 +08:00
Quick fix for questing, needs more investigation
This would make the questing work again
This commit is contained in:
parent
8840e2b574
commit
6448bb1b9b
@ -322,6 +322,8 @@ public class AbilityModifier implements Serializable {
|
||||
public String srcTarget, dstTarget;
|
||||
public String srcKey, dstKey;
|
||||
|
||||
public int skillID;
|
||||
|
||||
public int param1;
|
||||
public int param2;
|
||||
public int param3;
|
||||
|
@ -1,17 +1,27 @@
|
||||
package emu.grasscutter.game.ability.actions;
|
||||
|
||||
import com.google.protobuf.ByteString;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction;
|
||||
import emu.grasscutter.game.ability.Ability;
|
||||
import emu.grasscutter.game.entity.EntityAvatar;
|
||||
import emu.grasscutter.game.entity.GameEntity;
|
||||
import emu.grasscutter.game.quest.enums.QuestContent;
|
||||
|
||||
@AbilityAction(AbilityModifierAction.Type.AvatarSkillStart)
|
||||
public final class ActionAvatarSkillStart extends AbilityActionHandler {
|
||||
public class ActionAvatarSkillStart extends AbilityActionHandler {
|
||||
@Override
|
||||
public boolean execute(
|
||||
Ability ability, AbilityModifierAction action,
|
||||
ByteString abilityData, GameEntity target
|
||||
) {
|
||||
return false;
|
||||
public boolean execute(Ability ability, AbilityModifierAction action, ByteString abilityData, GameEntity target) {
|
||||
GameEntity owner = ability.getOwner();
|
||||
if(owner instanceof EntityAvatar avatar) {
|
||||
avatar.getPlayer().getQuestManager().queueEvent(QuestContent.QUEST_CONTENT_SKILL, action.skillID);
|
||||
} else {
|
||||
Grasscutter.getLogger().warn("AvatarSkillStart not implemented for other entities than EntityAvatar right now");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user