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

Added lifestone attunment, @ls recall, and position fixes. #213

Merged
merged 1 commit into from
Apr 6, 2017

Conversation

fantoms
Copy link
Contributor

@fantoms fantoms commented Apr 6, 2017

Also worked out the log4net problems for debugging databases

@fantoms fantoms force-pushed the feature-LifestoneUsage branch 2 times, most recently from a00ea41 to 34abe01 Compare April 6, 2017 04:56
Worked out the log4net problems and changed database logging

Testing appveyor

Reset debugging

Updated changelog

Changed Lifestone usage recall to the correct enum
@@ -78,8 +84,8 @@ public void AddPreparedStatement<T>(T id, params object[] parameters)
}
catch (MySqlException transactionException)
{
Console.WriteLine($"An exception occured while commiting a transaction of {queries.Count} queries, a rollback will be performed!");
Console.WriteLine($"Exception: {transactionException.Message}");
log.Error($"An exception occured while commiting a transaction of {queries.Count} queries, a rollback will be performed!");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this be set to Error channel? I believe it's more relevant to capture these exceptions as errors, if different logging levels are being utilized.

float dy = Math.Abs(landBlockObject.Position.PositionY - session.Player.Location.PositionY);
float dz = Math.Abs(landBlockObject.Position.PositionZ - session.Player.Location.PositionZ);

// check if the distance is greater then
Copy link
Contributor

Choose a reason for hiding this comment

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

This should use 3D pythagorean math, not checks on individual axis components. It will work, but it's logically incorrect.

var objectId = new ObjectGuid(fullId);

// get the worldobject from the id, if it exists
AceObject landBlockObject = DatabaseManager.World.GetObjectsByLandblock(session.Player.Location.LandblockId.Landblock).Find(o => o.AceObjectId == objectId.Full);
Copy link
Contributor

Choose a reason for hiding this comment

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

I applaud the effort here. It's the best you could do with what you have. We really just need that action queue - stuff like this isn't going to fly in the long run.

@Mogwai-TheFurry Mogwai-TheFurry merged commit 9f5aebc into ACEmulator:master Apr 6, 2017
@fantoms fantoms deleted the feature-LifestoneUsage branch May 23, 2017 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants