MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / SpawnMob

Method SpawnMob

internal/scripting/room_func.go:446–456  ·  view source on GitHub ↗
(mobId int)

Source from the content-addressed store, hash-verified

444}
445
446func (r ScriptRoom) SpawnMob(mobId int) *ScriptActor {
447
448 if mob := mobs.NewMobById(mobs.MobId(mobId), r.roomId); mob != nil {
449
450 r.roomRecord.AddMob(mob.InstanceId)
451
452 return GetMob(mob.InstanceId)
453 }
454
455 return nil
456}
457
458func (r ScriptRoom) SendText(msg string, excludeIds ...int) {
459

Callers 1

GetMobMethod · 0.95

Calls 4

NewMobByIdFunction · 0.92
MobIdTypeAlias · 0.92
GetMobFunction · 0.85
AddMobMethod · 0.80

Tested by

no test coverage detected