Quick fix for questing, needs more investigation

This would make the questing work again
This commit is contained in:
StartForKiller 2023-05-31 22:28:53 -04:00 committed by KingRainbow44
parent 8840e2b574
commit 6448bb1b9b
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE
2 changed files with 18 additions and 6 deletions

View File

@ -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;

View File

@ -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
) {
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;
}
}