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

Cazador talento id: 155228 [Lobo solitario] bug #139

Closed
yudian1944 opened this issue Mar 4, 2023 · 15 comments
Closed

Cazador talento id: 155228 [Lobo solitario] bug #139

yudian1944 opened this issue Mar 4, 2023 · 15 comments

Comments

@yudian1944
Copy link

yudian1944 commented Mar 4, 2023

WoWScrnShot_030423_112407
Función: Cuando escoges este talento tu daño aumenta un 18% pero a cambio dejas de invocar a tu mascota.
Error: Cuando tienes el talento activo puedes usar [Domesticar bestia]id:1515, Domesticar una nueva mascota y seguir usándola.

@Elgrimm
Copy link

Elgrimm commented Mar 8, 2023

add PlayerScripts
void OnUpdate(Player* player, uint32 diff) override
{
if (player->HasSpell(155228))
{
player->RemoveAurasDueToSpell(1515);
}
}

@Elgrimm
Copy link

Elgrimm commented Mar 8, 2023

@yudian1944
class playerScriptLearnAndRemoveNew : public PlayerScript
{
public:
playerScriptLearnAndRemoveNew () : PlayerScript("playerScriptLearnAndRemoveNew ") { }

void OnUpdate(Player* player, uint32 diff) override
{
if (player->HasSpell(155228))
{
player->RemoveAurasDueToSpell(1515);
}
}
};

@Elgrimm
Copy link

Elgrimm commented Mar 8, 2023

in ->
void AddSC_player_special_scripts()
{
new playerScriptLearnNew();
...........
};

@yudian1944
Copy link
Author

in -> void AddSC_player_special_scripts() { new playerScriptLearnNew(); ........... };

Deberia ser asi: new playerScriptLearnAndRemoveNew();

@yudian1944
Copy link
Author

Ya añadí las líneas, y con el talento no deja domesticar nuevas mascotas pero el problema no viene solo por ahí, también sucede que cuando corregimos el issue #131 al modificar estas líneas :
*`void Spell::EffectSummonDeadPet(SpellEffIndex /effIndex/)
{...
Pet
pet = player->GetPet();
-- if (!pet)
++ if (pet && pet->isAlive())
++ return;
-- return;

-- if (pet->isAlive())
-- return;
if (damage < 0)
return;

float x, y, z;
player->GetPosition(x, y, z);

++ if (!pet)
++ {
++ player->SummonPet(0, x, y, z, player->GetOrientation(), SUMMON_PET, 0);
++ pet = player->GetPet();
++ }
++ if (!pet)
++ return;
player->GetMap()->CreatureRelocation(pet, x, y, z, player->GetOrientation());`*

Spell Id: 982 [Revivir mascota] ahora está invocando la mascota, o sea está haciendo la función de (llamar a mascota)

@Elgrimm
Copy link

Elgrimm commented Mar 9, 2023

@yudian1944 You can register in playerscript
in \src\server\scripts\World\player_special.cpp
........

  • class playerScriptLearnAndRemoveNew : public PlayerScript

  • {

  • public:

  • playerScriptLearnAndRemoveNew () : PlayerScript("playerScriptLearnAndRemoveNew ") { }

  • void OnUpdate(Player* player, uint32 diff) override

  • {

  • if (player->HasSpell(155228))

  • {

  • player->RemoveAurasDueToSpell(1515);

  • player->RemoveAurasDueToSpell(982);

  • }

  • }

  • };
    void AddSC_player_special_scripts()
    {
    .....

  • new playerScriptLearnNew();
    ...........
    };

@Elgrimm
Copy link

Elgrimm commented Mar 9, 2023

This repository is abandoned, apparently I will make a new branch soon and I will fix it there already

@yudian1944
Copy link
Author

Captura

@Elgrimm
Copy link

Elgrimm commented Mar 9, 2023

@yudian1944
void AddSC_player_special_scripts()
{
.....
delete- -> new playerScriptLearnNew();
++ new playerScriptLearnAndRemoveNew();
...........
};

@yudian1944
Copy link
Author

Ya lo he hecho pero aún sigue sin funcionar te dejo un video para que veas donde está el problema https://youtu.be/GgRMBHyfcW0

@Elgrimm
Copy link

Elgrimm commented Mar 10, 2023

@yudian1944
-- void OnUpdate(Player* player, uint32 diff) override
++ void OnSpellLearned(Player* player, uint32 spellID) override
{

-- if (player->HasSpell(155228))
++ if (spellID == 155228)

{

-- player->RemoveAurasDueToSpell(1515);
++ player->removeSpell(1515);
-- player->RemoveAurasDueToSpell(982);
++ player->removeSpell(982);

}

}

};
void AddSC_player_special_scripts()

@yudian1944
Copy link
Author

@Funciona pero al relogear el cliente los hechizos 1515 y 982 vuelven a estar disponibles y se pueden seguir utilizando con el talento.

@Elgrimm
Copy link

Elgrimm commented Mar 11, 2023

@yudian1944 ok, Changing the code by adding the update function

@Elgrimm
Copy link

Elgrimm commented Mar 11, 2023

void OnSpellLearned(Player* player, uint32 spellID) override
{
if (spellID == 155228)
{
player->removeSpell(1515);
player->removeSpell(982);

}

}

++ void OnUpdate(Player* player, uint32 diff) override

++ {

++ if (player->HasSpell(155228))

++ {

++ player->removeSpell(1515);
++ player->removeSpell(982);

++ }

++ }

};

@yudian1944
Copy link
Author

Bueno ahora si ha quedado solucionado el uso de este bug, gracias nuevamente @Elgrimm por el arreglo y sierro tema.

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

No branches or pull requests

2 participants