handle act 1/3/5 mercs (#5)
This commit is contained in:
@@ -119,7 +119,7 @@ func (m Monster) IsImmune(resist stat.Resist) bool {
|
||||
}
|
||||
|
||||
func (m Monster) IsMerc() bool {
|
||||
if m.Name == npc.Guard {
|
||||
if m.Name == npc.Guard || m.Name == npc.Act5Hireling1Hand || m.Name == npc.Act5Hireling2Hand || m.Name == npc.IronWolf || m.Name == npc.Rogue2 {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ func (gd *GameReader) Monsters(playerPosition data.Position, hover data.HoverDat
|
||||
|
||||
//monsterType := ReadUIntFromBuffer(monsterDataBuffer, 0x00, Uint32)
|
||||
txtFileNo := ReadUIntFromBuffer(monsterDataBuffer, 0x04, Uint32)
|
||||
if !gd.shouldBeIgnored(txtFileNo) {
|
||||
unitID := ReadUIntFromBuffer(monsterDataBuffer, 0x08, Uint32)
|
||||
|
||||
//mode := ReadUIntFromBuffer(monsterDataBuffer, 0x0C, Uint32)
|
||||
@@ -50,6 +49,8 @@ func (gd *GameReader) Monsters(playerPosition data.Position, hover data.HoverDat
|
||||
|
||||
stats := gd.getMonsterStats(statCount, statPtr)
|
||||
|
||||
// This excludes good NPCs but includes Mercs
|
||||
if !gd.shouldBeIgnored(txtFileNo) || stats[stat.Experience] > 0 {
|
||||
m := data.Monster{
|
||||
UnitID: data.UnitID(unitID),
|
||||
Name: npc.ID(int(txtFileNo)),
|
||||
@@ -156,7 +157,7 @@ func (gd *GameReader) shouldBeIgnored(txtNo uint) bool {
|
||||
npc.PoisonCloudTrap,
|
||||
npc.LightningTrap,
|
||||
npc.InvisoSpawner,
|
||||
//338, //Guard
|
||||
npc.Guard,
|
||||
npc.MiniSper,
|
||||
npc.BoneWall,
|
||||
npc.Hydra,
|
||||
|
||||
@@ -4,6 +4,8 @@ import "math"
|
||||
|
||||
const mapHashDivisor = 1 << 16
|
||||
|
||||
// Logic stolen from MapAssist, credits to them
|
||||
|
||||
func GetMapSeed(initHashSeed, endHashSeed uint) (uint, bool) {
|
||||
var gameSeedXor uint = 0
|
||||
seed, found := reverseMapSeedHash(endHashSeed)
|
||||
|
||||
Reference in New Issue
Block a user