Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equip and Unequip items #401

Closed
wants to merge 21 commits into from
Closed

Equip and Unequip items #401

wants to merge 21 commits into from

Conversation

ogmage78
Copy link
Contributor

  • Added the ability to equip and unequip items and have it also update your visual appearance.
  • We have some data work to do - to add clothing table did values, but we have added 30 or so for testing out of 150+ needed. Thanks OptimShi for the script and the updates - also all the help on clothing!
  • I am adding the script to load those testing values - they are the permanent solution just incomplete. However, it properly goes in ace world. The prerequisite to running the script is to have data loaded. If you do it out of order, no harm, it just will not work.

@@ -0,0 +1,5 @@
ALTER TABLE `ace_world`.`ace_position`
DROP COLUMN `landblock` ,
ADD COLUMN `landblock` INT(5) UNSIGNED AS ( ((landblockraw >> 16) & 0xFFFF)) STORED,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For performance reasons this line should remain VIRTUAL instead of STORED please.

It could also be changed back to a smallint since the expression used here doesn't complain about int. up to you on that one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the performance hit during a big import or when querying after the import?

Copy link
Contributor Author

@ogmage78 ogmage78 Jun 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the test again - it is faster stored on query (not insert) but it is not that impactful. I am ok with changing this back if it makes sense. It is 10 times as preformant 177,433 rows at 0.145 stored vs 1.135 seconds virtual due to the repeated calculations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can test with the following:

ALTER TABLE ace_world.ace_position
DROP INDEX idx_landblock,
DROP COLUMN landblock ,
ADD COLUMN landblock INT(5) UNSIGNED AS ( ((landblockraw >> 16) & 0xFFFF)) VIRTUAL,
ADD KEY idx_landblock (landblock);

select * from ace_position order by landblock

then

ALTER TABLE ace_world.ace_position
DROP INDEX idx_landblock,
DROP COLUMN landblock ,
ADD COLUMN landblock INT(5) UNSIGNED AS ( ((landblockraw >> 16) & 0xFFFF)) STORED,
ADD KEY idx_landblock (landblock);

select * from ace_position order by landblock

it would be easy to just drop this column during import of PCAPS as well then add at the end of the import. it takes 22 seconds to switch the column storage and build the index.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mogwai-TheFurry The impact was noticed on the first in-game load in of each place I visited, for example I loaded the server, logged in Arwic, exit portal, see empty town for a few seconds then objects populated, teleport to Holtburg, see same behavior with a variance of the length of time the load in takes, eventually return to Arwic and its town is loaded instantly back to the client which would make the think there is some caching in memory going on?

# Viamontian Laced Boots
INSERT INTO `ace_object_properties_did` (`aceObjectId`, `didPropertyId`, `propertyValue`) VALUES ('31249', '7', '268436911');
# Loafers
INSERT INTO `ace_object_properties_did` (`aceObjectId`, `didPropertyId`, `propertyValue`) VALUES ('31237', '7', '268436912');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please submit this data to ACE-World

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I put in my notes, this does belong there and could be moved a little later. You can't test the work I did without this. Again, you don't consider what the free developer is trying to do or say. This is open source. I think the word is collaboration.

item = ClothingTable.ReadFromDat((uint)wo.ClothingBase);
else
item = ClothingTable.ReadFromDat(0x10000002);
// If I don't find a match, for now you are pants!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe change this to some kind of error catcher with a do nothing on the model + chat error like portals do when they aren't wired up, so we don't end up with some mixed results?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a change I plan to make later. Thanks

@ogmage78
Copy link
Contributor Author

That is really all I have to say. Thanks

@ACEmulator ACEmulator deleted a comment from ogmage78 Jun 21, 2017
@Mogwai-TheFurry
Copy link
Contributor

Tried to merge by hand - Container was fine. Landblock is no-go.

@ogmage78
Copy link
Contributor Author

Going to reimplement after major overhaul

@ogmage78 ogmage78 closed this Jun 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants