Fix admin mob spawn
This commit is contained in:
@@ -147,6 +147,26 @@ public partial class DungeonHandler
|
|||||||
FacingDirection = "down"
|
FacingDirection = "down"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Add basic attack ability (same as DungeonSimulation fallback)
|
||||||
|
mob.Abilities.Add(new MobAbilityState
|
||||||
|
{
|
||||||
|
AbilityId = 0,
|
||||||
|
Definition = new DataServer.Data.Entities.MobAbilityDefinition
|
||||||
|
{
|
||||||
|
Id = 0,
|
||||||
|
Name = "Basic Attack",
|
||||||
|
Key = "basic_attack",
|
||||||
|
AbilityType = DataServer.Data.Enums.MobAbilityType.MeleeAttack,
|
||||||
|
BaseDamage = stats.PhysicalDamage,
|
||||||
|
Range = stats.AttackRange,
|
||||||
|
Cooldown = 1f / stats.AttackSpeed,
|
||||||
|
AnimationKey = "attack",
|
||||||
|
DamageTypeKey = stats.DamageTypeKey
|
||||||
|
},
|
||||||
|
CooldownRemaining = 0,
|
||||||
|
Priority = 1
|
||||||
|
});
|
||||||
|
|
||||||
dungeon.Simulation.Mobs[newMobId] = mob;
|
dungeon.Simulation.Mobs[newMobId] = mob;
|
||||||
|
|
||||||
return mob;
|
return mob;
|
||||||
|
|||||||
Reference in New Issue
Block a user