revert(Core): ChrRace.dbc full implementation (#16114)
* revert (core): ChrRace.dbc full implementation we revert this due to several issues arrising. Although the dbc reading is done in full and correctly. Azerothcore relied on the original handling (althought not propper) for so long that there is * revert * Update remove_charrace_dbc.sql * Update remove_charrace_dbc.sql * Update remove_charrace_dbc.sql
This commit is contained in:
parent
43103b6145
commit
7e58650cf5
26 changed files with 225 additions and 165 deletions
|
|
@ -180,13 +180,13 @@ struct npc_pet_gen_argent_pony_bridle : public ScriptedAI
|
|||
{
|
||||
_state = ARGENT_PONY_STATE_ENCH;
|
||||
|
||||
aura = (player->GetTeamId() == TEAM_ALLIANCE ? SPELL_AURA_TIRED_S : SPELL_AURA_TIRED_G);
|
||||
aura = (player->GetTeamId(true) == TEAM_ALLIANCE ? SPELL_AURA_TIRED_S : SPELL_AURA_TIRED_G);
|
||||
duration = player->GetSpellCooldownDelay(aura);
|
||||
me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_GOSSIP);
|
||||
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
if (player->GetTeamId() == TEAM_ALLIANCE)
|
||||
if (player->GetTeamId(true) == TEAM_ALLIANCE)
|
||||
{
|
||||
if (uint32 cooldown = player->GetSpellCooldownDelay(SPELL_AURA_POSTMAN_S + i))
|
||||
{
|
||||
|
|
@ -211,7 +211,7 @@ struct npc_pet_gen_argent_pony_bridle : public ScriptedAI
|
|||
}
|
||||
|
||||
// Generate Banners
|
||||
uint32 mask = player->GetTeamId() ? RACEMASK_HORDE : RACEMASK_ALLIANCE;
|
||||
uint32 mask = player->GetTeamId(true) ? RACEMASK_HORDE : RACEMASK_ALLIANCE;
|
||||
for (uint8 i = 1; i < MAX_RACES; ++i)
|
||||
if (mask & (1 << (i - 1)) && player->HasAchieved(argentBanners[i].achievement))
|
||||
_banners[i] = true;
|
||||
|
|
@ -268,7 +268,7 @@ struct npc_pet_gen_argent_pony_bridle : public ScriptedAI
|
|||
if (player->GetGUID() != creature->GetOwnerGUID())
|
||||
return true;
|
||||
|
||||
if (!creature->HasAura(player->GetTeamId() ? SPELL_AURA_TIRED_G : SPELL_AURA_TIRED_S))
|
||||
if (!creature->HasAura(player->GetTeamId(true) ? SPELL_AURA_TIRED_G : SPELL_AURA_TIRED_S))
|
||||
{
|
||||
uint8 _state = creature->AI()->GetData(0 /*GET_DATA_STATE*/);
|
||||
if (_state == ARGENT_PONY_STATE_ENCH || _state == ARGENT_PONY_STATE_VENDOR)
|
||||
|
|
@ -296,20 +296,20 @@ struct npc_pet_gen_argent_pony_bridle : public ScriptedAI
|
|||
case GOSSIP_ACTION_TRADE:
|
||||
creature->ReplaceAllNpcFlags(UNIT_NPC_FLAG_VENDOR);
|
||||
player->GetSession()->SendListInventory(creature->GetGUID());
|
||||
spellId = player->GetTeamId() ? SPELL_AURA_SHOP_G : SPELL_AURA_SHOP_S;
|
||||
spellId = player->GetTeamId(true) ? SPELL_AURA_SHOP_G : SPELL_AURA_SHOP_S;
|
||||
creature->AI()->DoAction(ARGENT_PONY_STATE_VENDOR);
|
||||
break;
|
||||
case GOSSIP_ACTION_BANK:
|
||||
creature->ReplaceAllNpcFlags(UNIT_NPC_FLAG_BANKER);
|
||||
player->GetSession()->SendShowBank(player->GetGUID());
|
||||
spellId = player->GetTeamId() ? SPELL_AURA_BANK_G : SPELL_AURA_BANK_S;
|
||||
spellId = player->GetTeamId(true) ? SPELL_AURA_BANK_G : SPELL_AURA_BANK_S;
|
||||
creature->AI()->DoAction(ARGENT_PONY_STATE_BANK);
|
||||
break;
|
||||
case GOSSIP_ACTION_MAILBOX:
|
||||
{
|
||||
creature->ReplaceAllNpcFlags(UNIT_NPC_FLAG_GOSSIP | UNIT_NPC_FLAG_MAILBOX);
|
||||
player->GetSession()->SendShowMailBox(creature->GetGUID());
|
||||
spellId = player->GetTeamId() ? SPELL_AURA_POSTMAN_G : SPELL_AURA_POSTMAN_S;
|
||||
spellId = player->GetTeamId(true) ? SPELL_AURA_POSTMAN_G : SPELL_AURA_POSTMAN_S;
|
||||
creature->AI()->DoAction(ARGENT_PONY_STATE_MAILBOX);
|
||||
break;
|
||||
}
|
||||
|
|
@ -326,7 +326,7 @@ struct npc_pet_gen_argent_pony_bridle : public ScriptedAI
|
|||
{
|
||||
creature->CastSpell(creature, spellId, true);
|
||||
player->AddSpellCooldown(spellId, 0, 3 * MINUTE * IN_MILLISECONDS);
|
||||
player->AddSpellCooldown(player->GetTeamId() ? SPELL_AURA_TIRED_G : SPELL_AURA_TIRED_S, 0, 3 * MINUTE * IN_MILLISECONDS + 4 * HOUR * IN_MILLISECONDS);
|
||||
player->AddSpellCooldown(player->GetTeamId(true) ? SPELL_AURA_TIRED_G : SPELL_AURA_TIRED_S, 0, 3 * MINUTE * IN_MILLISECONDS + 4 * HOUR * IN_MILLISECONDS);
|
||||
creature->DespawnOrUnsummon(3 * MINUTE * IN_MILLISECONDS);
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue