BosslandGmbH / SenseibuddyBugs

Bugtracker for Senseibuddy
0 stars 0 forks source link

(a.Id >> 16) + 1 - 20070 does not generate the correct teleport id. #15

Closed zzi-zzi-zzi closed 8 years ago

zzi-zzi-zzi commented 8 years ago
public static void Run()
{
    var map = GameManager.UiRoot.FindUIScreenObject<UCustomUIMiniMap>("MapWindowPanel.MapWindow_MapHolder.MapWindow_Minimap") as UCustomUIMiniMap;

            if (map != null)
            {
                foreach (var a in map.UnitArray)
                {
                    if (!a.bIsRender)
                        continue;
             if ((a.LowLabel & 0x8000000) != 0)
             {
            var rec = DataTables.Mapunit.GetRecord(a.Id >> 16);
                      Log(rec.Alias + " => " + rec.Category + " => " + rec.RecordType + " => " + DataTables.Text.GetRecord(rec.Name2RecordId).Text);
                      Log(a);
            var TeleportId = (a.Id >> 16) + 1 - 20070;
            Log("");
            Log("Map Id: " + TeleportId);

            var TeleportInfo = DataTables.Teleport.GetRecord(TeleportId);
            Log(TeleportInfo.Dump());
                    }

                }
            }
}

reports that the Teleport for the map i am on is The Plogstead Expected: Mushin's Tower

ApocDev commented 8 years ago

Should be fixed with the new logic available in WorldMap

zzi-zzi-zzi commented 8 years ago

This looks good to me. thanks :D