mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-20 19:04:40 +01:00
* Apply fix `21dec2fe` * Apply fix `89d01d5f` * Apply fix `d900f154` this one was already implemented; updated to use call from previous commit * Ability changing commit TODO: change info to debug * Remove use of deprecated methods/fields * Temp commit v2 (Adding LoseHP and some fixes) * Oopsie * Probably fix monster battle * Fix issue with reflecting into fields * Fix some things * Fix ability names for 3.6 resources * Improve logging --------- Co-authored-by: StartForKiller <jesussanz2003@gmail.com>
58 lines
1.5 KiB
Java
58 lines
1.5 KiB
Java
package emu.grasscutter.game.entity;
|
|
|
|
import emu.grasscutter.data.GameData;
|
|
import emu.grasscutter.data.binout.AbilityData;
|
|
import emu.grasscutter.game.props.EntityIdType;
|
|
import emu.grasscutter.game.world.Scene;
|
|
import emu.grasscutter.net.proto.SceneEntityInfoOuterClass.SceneEntityInfo;
|
|
import emu.grasscutter.game.world.Position;
|
|
import it.unimi.dsi.fastutil.ints.Int2FloatArrayMap;
|
|
import it.unimi.dsi.fastutil.ints.Int2FloatMap;
|
|
|
|
public class EntityScene extends GameEntity {
|
|
|
|
public EntityScene(Scene scene) {
|
|
super(scene);
|
|
initAbilities();
|
|
}
|
|
|
|
@Override
|
|
public void initAbilities() {
|
|
//Load abilities from levelElementAbilities
|
|
for(var ability : GameData.getConfigGlobalCombat().getDefaultAbilities().getLevelElementAbilities()) {
|
|
AbilityData data = GameData.getAbilityData(ability);
|
|
if(data != null)
|
|
getScene().getWorld().getHost().getAbilityManager().addAbilityToEntity(
|
|
this, data);
|
|
}
|
|
}
|
|
|
|
@Override
|
|
public int getEntityTypeId() {
|
|
return 0x13;
|
|
}
|
|
|
|
@Override
|
|
public Int2FloatMap getFightProperties() {
|
|
//TODO
|
|
return new Int2FloatArrayMap();
|
|
}
|
|
|
|
@Override
|
|
public Position getPosition() {
|
|
// TODO Auto-generated method stub
|
|
return new Position(0, 0, 0);
|
|
}
|
|
|
|
@Override
|
|
public Position getRotation() {
|
|
return new Position(0, 0, 0);
|
|
}
|
|
|
|
@Override
|
|
public SceneEntityInfo toProto() {
|
|
return null;
|
|
}
|
|
|
|
}
|