mirror of
https://github.com/redstrate/Kawari.git
synced 2025-04-20 14:47:45 +00:00
Allow attacking the monster spawned by !spawnmonster again
I broke this while refactoring other actor things.
This commit is contained in:
parent
42dce0f9c2
commit
16af49cea4
1 changed files with 10 additions and 2 deletions
|
@ -4,7 +4,7 @@ use crate::{
|
||||||
opcodes::ServerZoneIpcType,
|
opcodes::ServerZoneIpcType,
|
||||||
packet::{PacketSegment, SegmentType},
|
packet::{PacketSegment, SegmentType},
|
||||||
world::{
|
world::{
|
||||||
Event,
|
Actor, Event,
|
||||||
ipc::{
|
ipc::{
|
||||||
ActorControl, ActorControlCategory, BattleNpcSubKind, CommonSpawn, DisplayFlag,
|
ActorControl, ActorControlCategory, BattleNpcSubKind, CommonSpawn, DisplayFlag,
|
||||||
EventStart, NpcSpawn, ObjectKind, OnlineStatus, PlayerSpawn, PlayerSubKind,
|
EventStart, NpcSpawn, ObjectKind, OnlineStatus, PlayerSpawn, PlayerSubKind,
|
||||||
|
@ -203,6 +203,8 @@ impl ChatHandler {
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
"!spawnmonster" => {
|
"!spawnmonster" => {
|
||||||
|
let spawn_index = connection.get_free_spawn_index();
|
||||||
|
|
||||||
// spawn a tiny mandragora
|
// spawn a tiny mandragora
|
||||||
{
|
{
|
||||||
let ipc = ServerZoneIpcSegment {
|
let ipc = ServerZoneIpcSegment {
|
||||||
|
@ -218,7 +220,7 @@ impl ChatHandler {
|
||||||
hp_max: 91,
|
hp_max: 91,
|
||||||
mp_curr: 100,
|
mp_curr: 100,
|
||||||
mp_max: 100,
|
mp_max: 100,
|
||||||
spawn_index: connection.get_free_spawn_index(),
|
spawn_index,
|
||||||
bnpc_base: 13498, // TODO: changing this prevents it from spawning...
|
bnpc_base: 13498, // TODO: changing this prevents it from spawning...
|
||||||
bnpc_name: 405,
|
bnpc_name: 405,
|
||||||
object_kind: ObjectKind::BattleNpc(BattleNpcSubKind::Enemy),
|
object_kind: ObjectKind::BattleNpc(BattleNpcSubKind::Enemy),
|
||||||
|
@ -240,6 +242,12 @@ impl ChatHandler {
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
connection.actors.push(Actor {
|
||||||
|
id: ObjectId(0x106ad804),
|
||||||
|
hp: 91,
|
||||||
|
spawn_index: spawn_index as u32,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
"!playscene" => {
|
"!playscene" => {
|
||||||
let parts: Vec<&str> = chat_message.message.split(' ').collect();
|
let parts: Vec<&str> = chat_message.message.split(' ').collect();
|
||||||
|
|
Loading…
Add table
Reference in a new issue