issues: 358663130
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
358663130 | MDExOlB1bGxSZXF1ZXN0MjE0MzQ0Njg0 | 1010 | WorldObject Position Updates | 10608427 | closed | 0 | 0 | 2018-09-10T14:59:24Z | 2018-09-11T00:49:24Z | 2018-09-11T00:49:00Z | MEMBER | 0 | ACEmulator/ACE/pulls/1010 | WorldObject.Positions was misused. The code has been cleaned up so that Position access passes through the Get/Set/Remove functions. Furthermore, on save, we make sure that the positions in the biota have the latest up to date values from the cache. We must do this because we don't wrap Positions like we do attributes/skills/vitals. Also added a very important note regarding use of SetPosition: /// !!! VERY IMPORTANT NOTE REGARDING SetPosition !!!<para /> /// Position objects are reference types. Lets say you want to create a new object and give it the location of a player, /// If you do LandscapeItem.SetPosition(PositionType.Location, Player.Location), you've now set the Location position /// for both the player and the LandscapeItem to the same exact object. Modifying one will affect the other.<para /> /// The proper way to would be: LandscapeItem.SetPosition(PositionType.Location, (Position)Player.Location.Clone())<para /> /// Any time you want to set a position of a different PositionType, or, positions between WorldObjects, you should use the above Clone method. | {"url": "https://api.github.com/repos/ACEmulator/ACE/issues/1010/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 79078680 | pull |