Npc/Monsters Mode and Portals destination + optimization (#49)
* Added States for monsters and corpses
Now can properly identify if a corpse is interactable with a skill ( barbarian, necromancer)
Also getting states about monsters : Exemple Soul Killer with Conviction aura: State 28 // conviction
Also can tell if monster has a state after you used a skill on it Exemple: State 56 Terror ( After using Barbarian skill Howl to fear )
Another Exemple using Grief on Mephistos he now have states : 2 poison
52 Preventheal
will be very useful for further development.
* Added modes to player
Now accessible in koolo using : s.data.PlayerUnit.Mode
Those are Modes for player:
const Death: 0;
const StandingOutsideTown: 1;
const Walking: 2;
const Running: 3;
const GettingHit: 4;
const StandingInTown: 5;
const WalkingInTown: 6;
const Attacking1: 7;
const Attacking2: 8;
const Blocking: 9;
const CastingSkill: 10;
const ThrowingItem: 11;
const Kicking: 12;
const UsingSkill1: 13;
const UsingSkill2: 14;
const UsingSkill3: 15;
const UsingSkill4: 16;
const Dead: 17;
const SkillActionSequence: 18;
const KnockedBack: 19;
* update Added alias(const) for player modes
can be used like this s.data.PlayerUnit.Mode == mode.StandingInTown
* added modes to object
0 = Object idle
1 = Object operating
2 = Object opened
3 = Object special 1 ?? to be determined what it does exactly
4 = Object special 2 ?? to be determined what it does exactly
5 = Object special 3 ?? to be determined what it does exactly
6 = Object special 4 ?? to be determined what it does exactly
7 = Object special 5 ?? to be determined what it does exactly
* update object mode strings
* Update object_mode.go
* Update object_mode.go
* update object modes again. accurate now
* Added IsSealBoss() for Chaos Run
* Npc/Monster Modes and Portals destination
also IsEscapingType() Monster cannot be attacked when airborne or hide in water (NpcMode 8)
* Npc/Monster Modes and Portals destination
also IsEscapingType() Monster cannot be attacked when airborne or hide in water (NpcMode 8)
* Optimized monsters.go and object.go
also catapults have been added to ignore list
* Tz Frigid Higland ingores added
This commit is contained in:
@@ -15,6 +15,7 @@ type Object struct {
|
||||
Position Position
|
||||
Owner string
|
||||
Mode mode.ObjectMode
|
||||
PortalData object.PortalData
|
||||
}
|
||||
|
||||
type Objects []Object
|
||||
@@ -25,7 +26,6 @@ func (o Objects) FindOne(name object.Name) (Object, bool) {
|
||||
return obj, true
|
||||
}
|
||||
}
|
||||
|
||||
return Object{}, false
|
||||
}
|
||||
|
||||
@@ -35,7 +35,6 @@ func (o Objects) FindByID(id UnitID) (Object, bool) {
|
||||
return obj, true
|
||||
}
|
||||
}
|
||||
|
||||
return Object{}, false
|
||||
}
|
||||
|
||||
@@ -67,7 +66,6 @@ func (o Object) IsShrine() bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (o Object) IsWaypoint() bool {
|
||||
switch o.Name {
|
||||
case object.WaypointPortal,
|
||||
@@ -88,7 +86,6 @@ func (o Object) IsWaypoint() bool {
|
||||
object.ExpansionWaypoint:
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -110,7 +107,6 @@ func (o Object) IsChest() bool {
|
||||
502, 504, 505, 518, 524, 525, 526, 529, 530, 531, 532, 533, 534, 535, 540, 541, 544, 545, 556, 580, 581:
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
func (o Object) IsDoor() bool {
|
||||
@@ -145,7 +141,6 @@ func (o Object) IsDoor() bool {
|
||||
object.ExpansionTownGate:
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -154,6 +149,5 @@ func (o Object) IsSuperChest() bool {
|
||||
case 104, 105, 106, 107, 181, 183, 580, 397, 387, 389, 390, 391, 455:
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user