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

Followerslots with EF_FollowerList - FIX #1251 #1252

Closed
wants to merge 1 commit into from

Conversation

GladieUO
Copy link
Contributor

@GladieUO GladieUO commented Jun 18, 2024

Fix for the review

Tested on local and seems good.

  • checks for curfollowers + followerslots <= maxfollowers
  • add tamed follower to the list * followerslots (2 followerslots = 2 positions in list)
  • no need for extra code in @FollowersUpdate

Issue:
#1251

while using EF_FollowerList
Sphereserver#1251
{
for (short i = 0; i < iFollowerSlots; ++i)
{
m_followers.emplace_back(pChar->GetUID());
Copy link
Contributor

Choose a reason for hiding this comment

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

We could do that better, by making m_followers a vector of std::pair<ushort, CUID>, where the first number is the followerslots, value the second the UID.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can try, but I think Im not capable of doing that. Wouldnt that need more complex changes in the whole code?

Copy link
Contributor Author

@GladieUO GladieUO Jun 27, 2024

Choose a reason for hiding this comment

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

I suppose its defined as CUID already
std::vector<CUID> m_followers; which means we would have to review every code where is it used? If we change it to std::vector<std::pair<ushort, CUID>> m_followers; ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Im sorry im not able to do that, I guess if we change the def of the vector, we need to change every part where the FollowersUpdate is called/used, and even with the AI help, I couldnt make it work. 😥
Anyone ideas or more experience?

Copy link
Contributor

Choose a reason for hiding this comment

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

I will take care of it, we'll need to change other code to make it working but it will be worth it.

@cbnolok cbnolok closed this Jul 3, 2024
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.

2 participants