Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.

Commit

Permalink
fix map loading issue
Browse files Browse the repository at this point in the history
  • Loading branch information
joffreybesos committed Jun 15, 2022
1 parent 7f4916e commit 59d7081
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ All notable changes to this project will be documented in this file.

## [2.9.17] - 2021-06-14 - Minor changes

- Fixed poison damage of item stats with an ugly hack
- TP scroll counter will flash with only 3 or less scrolls rather than 5
- Fixed poison damage of item stats with an ugly hack
- Fixed issue where map would freeze in certain circumstances

## [2.9.16] - 2021-06-14 - Minor changes

Expand Down
2 changes: 1 addition & 1 deletion src/d2r-map.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Menu, Tray, Add, Reload, Reload
Menu, Tray, Add
Menu, Tray, Add, Exit, ExitMH

global version := "2.9.16"
global version := "2.9.17"

WriteLog("*******************************************************************")
WriteLog("* Map overlay started https://github.com/joffreybesos/d2r-mapview *")
Expand Down
20 changes: 10 additions & 10 deletions src/memory/readParty.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ ReadParty(ByRef d2rprocess, ByRef partyList, ByRef playerUnitId) {
, yPos := d2rprocess.read(partyStruct + 0x64, "UInt")
, hostilePtr := d2rprocess.read(partyStruct + 0x70, "Int64")
, isHostileToPlayer := false
while (hostilePtr) {
hostileUnitId := d2rprocess.read(hostilePtr, "UInt")
hostileFlag := d2rprocess.read(hostilePtr + 0x04, "UInt")
hostilePtr := d2rprocess.read(hostilePtr + 0x08, "Int64")
if (playerUnitId == hostileUnitId) {
if (hostileFlag > 0) {
isHostileToPlayer := true
}
}
}
; while (hostilePtr) {
; hostileUnitId := d2rprocess.read(hostilePtr, "UInt")
; hostileFlag := d2rprocess.read(hostilePtr + 0x04, "UInt")
; hostilePtr := d2rprocess.read(hostilePtr + 0x08, "Int64")
; if (playerUnitId == hostileUnitId) {
; if (hostileFlag > 0) {
; isHostileToPlayer := true
; }
; }
; }
player := { "name": name, "unitId": unitId, "area": area, "partyId": partyId, "plevel": plevel, "xPos": xPos, "yPos": yPos, "isHostileToPlayer": isHostileToPlayer }
partyList.push(player)
partyStruct := d2rprocess.read(partyStruct + 0x148, "Int64") ; get next player
Expand Down

0 comments on commit 59d7081

Please sign in to comment.