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

World fix and fireball test #187

Closed
wants to merge 5 commits into from
Closed

World fix and fireball test #187

wants to merge 5 commits into from

Conversation

Forbiddenz
Copy link
Contributor

World Object Fixes + My test Spell firewall - sorta.. so I could test it some more.
New AceVector Object.


namespace ACE.Entity
{
public class AceVector3
Copy link
Contributor

Choose a reason for hiding this comment

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

3 private floats, that you can't get out once set? What's the point? What does this object give us that the existing Vector3 object doesn't?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will add ability to get a real vector 3 but it's not what this was intended for but it could be added as a way to retrieve it through a protected function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will add ability to get a real vector 3 but it's not what this was intended for but it could be added as a way to retrieve it through a protected function

/// <summary>
/// creates a spell with velocity directly in front of the player's position provided
/// </summary>
public static ImmutableWorldObject CreateCastedSpell(ushort weenieClassId, Position newPosition, ObjectGuid objectid, AceVector3 velocity)
Copy link
Contributor

Choose a reason for hiding this comment

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

Spells are very much mutable. They have motion and do things, so use MutableObject.

float z = float.Parse(parameters[2], CultureInfo.InvariantCulture.NumberFormat);

// we got to keep track because we going to send a effect..
AceVector3 velocity = new AceVector3(36f, 9.8f, -1.3f);
Copy link
Contributor

Choose a reason for hiding this comment

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

What do these float values represent? Document them please.

@@ -30,10 +30,10 @@ public class PhysicsData
public float Friction;
public float Elastcity;
public uint AnimationFrame;
public Position Acceleration;
public AceVector3 Acceleration;
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, we already had System.Numerics.Vector3. See previous comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

System.Numerics.vector3 does not write packet payloads in the correct order.
But I will add the ability to return a vector.

But AceVector follows the position class, although position is over loaded

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, makes sense. Just give us a way to get the values out after it's been created. We can let these vectors live longer than 1 send and just update the values they have in them. Also, physics engine will need to read them out at some point.

ImmutableWorldObject wo = new ImmutableWorldObject(ObjectType.None, objectid, "Ball of Death", weenieClassId, ObjectDescriptionFlag.None, weenie, newPosition);

// flame bolt
wo.GameData.Spell = (ushort)27;
Copy link
Contributor

Choose a reason for hiding this comment

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

Make a spells enum instead of hard-coding 27. This data existed in Decal before, so I'm sure we can get it now.

wo.PhysicsData.Velocity = velocity;
wo.PhysicsData.Friction = (uint)1f;
wo.PhysicsData.Elastcity = (uint)0;
wo.PhysicsData.DefaultScript = (uint)90; // this needs a enum
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree, make an enum :p

@Forbiddenz
Copy link
Contributor Author

Updated

@Forbiddenz
Copy link
Contributor Author

Removed some useless comments I noticed too.

  • Spell is now a mutable object

@Forbiddenz
Copy link
Contributor Author

Spells ! We have some fun spells.. I will work to improve it but this is worth it to submit it now as it should works in multiplayer for giggles..

@Forbiddenz
Copy link
Contributor Author

Closing this, I found some issues with it.
I also am thinking we need some kind of naming convention between Entity and Enum..
Starting to Get confusing.. IE
PlayerEntity, SpellEntity, Etc as we build more entitys.. enums should just be Spell, Player, etc as needed.

@Forbiddenz Forbiddenz closed this Apr 1, 2017
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