enable playerhousing and bpet fix
This commit is contained in:
@@ -167,10 +167,6 @@ namespace PetBattles
|
||||
if (!creature)
|
||||
return;
|
||||
|
||||
// Retail sends the wild creature's GUID as the enemy team's CharacterGUID so the
|
||||
// client can identify the opponent; a null GUID here breaks the combat log too.
|
||||
wildTeam.PlayerGUID = wildCreatureGUID;
|
||||
|
||||
// Wild team size: 1-3 pets, but never more than the player's available pets
|
||||
uint8 playerPetCount = _teams[PET_BATTLE_TEAM_1].PetCount;
|
||||
uint8 maxWildSize = std::min(uint8(3), playerPetCount);
|
||||
@@ -197,10 +193,6 @@ namespace PetBattles
|
||||
// First pet is always the targeted creature
|
||||
{
|
||||
PetBattlePetData& wildPet = wildTeam.Pets[0];
|
||||
// Wild pets need a real GUID: the client's pet-battle combat log keys every
|
||||
// ability cast on caster/target BattlePetGUID, and a null GUID crashes it
|
||||
// (CombatLogEntry::PushEvent(casterGuidType, targetGuidType): 0, 0).
|
||||
wildPet.BattlePetGUID = ObjectGuid::Create<HighGuid::BattlePet>(sObjectMgr->GetGenerator<HighGuid::BattlePet>().Generate());
|
||||
wildPet.CreatureID = creature->GetEntry();
|
||||
wildPet.DisplayID = creature->GetDisplayId();
|
||||
wildPet.Level = getWildLevel();
|
||||
@@ -221,7 +213,6 @@ namespace PetBattles
|
||||
for (uint8 i = 1; i < wildTeamSize; ++i)
|
||||
{
|
||||
PetBattlePetData& wildPet = wildTeam.Pets[i];
|
||||
wildPet.BattlePetGUID = ObjectGuid::Create<HighGuid::BattlePet>(sObjectMgr->GetGenerator<HighGuid::BattlePet>().Generate());
|
||||
wildPet.CreatureID = creature->GetEntry();
|
||||
wildPet.DisplayID = creature->GetDisplayId();
|
||||
|
||||
@@ -908,21 +899,6 @@ namespace PetBattles
|
||||
return;
|
||||
}
|
||||
|
||||
// Additional safety check: validate abilityID exists in DB2
|
||||
if (!sBattlePetAbilityStore.LookupEntry(abilityID))
|
||||
{
|
||||
TC_LOG_ERROR("server.loading", "PetBattle ApplyAbilityEffects: abilityID={} does not exist in BattlePetAbility.db2! Preventing crash.", abilityID);
|
||||
PetBattleRoundEffect effect;
|
||||
effect.AbilityEffectID = abilityID;
|
||||
effect.EffectType = PET_BATTLE_EFFECT_STATUS_CHANGE;
|
||||
effect.SourceTeam = attackerTeam;
|
||||
effect.SourcePet = attackerPet;
|
||||
effect.TargetTeam = attackerTeam;
|
||||
effect.TargetPet = attackerPet;
|
||||
_roundEffects.push_back(effect);
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine which turn in the sequence to execute
|
||||
uint8 turnIndex = 0;
|
||||
if (attacker.IsLockedByMultiTurn && attacker.MultiTurnAbilityID == int32(abilityID))
|
||||
@@ -2822,19 +2798,11 @@ namespace PetBattles
|
||||
PetBattleTeamData& trainerTeam = _teams[PET_BATTLE_TEAM_2];
|
||||
trainerTeam.PetCount = 0;
|
||||
|
||||
// Retail sends the trainer's GUID as the NPC team's CharacterGUID (same reasoning
|
||||
// as wild battles: the client's combat log keys ability casts on these GUIDs).
|
||||
trainerTeam.PlayerGUID = trainer->GetGUID();
|
||||
|
||||
for (size_t i = 0; i < npcTeam.size() && i < MAX_PET_BATTLE_TEAM_SIZE; ++i)
|
||||
{
|
||||
NPCTeamPetInfo const& info = npcTeam[i];
|
||||
PetBattlePetData& pet = trainerTeam.Pets[i];
|
||||
|
||||
// NPC pets need a real GUID so the client's combat log (which is keyed on
|
||||
// caster/target BattlePetGUID) doesn't dereference a null GUID when an
|
||||
// ability resolves.
|
||||
pet.BattlePetGUID = ObjectGuid::Create<HighGuid::BattlePet>(sObjectMgr->GetGenerator<HighGuid::BattlePet>().Generate());
|
||||
pet.Species = info.SpeciesID;
|
||||
pet.Level = info.Level;
|
||||
pet.Breed = info.BreedID;
|
||||
|
||||
@@ -197,10 +197,10 @@ void WorldSession::SendFeatureSystemStatusGlueScreen()
|
||||
// Housing game rules ? ALL values verified against 12.0.1.65940 sniff packet data (Feb 2026)
|
||||
// Service & feature flags (read from config, default true)
|
||||
{ "performHousingExpansionCheckClient"sv, "0"sv },
|
||||
{ "housingServiceEnabled"sv, "0"sv },
|
||||
{ "housingEnableBuyHouse"sv, "0"sv },
|
||||
{ "housingEnableDeleteHouse"sv, "0" },
|
||||
{ "housingEnableMoveHouse"sv, "0"sv },
|
||||
{ "housingServiceEnabled"sv, "1"sv },
|
||||
{ "housingEnableBuyHouse"sv, "1"sv },
|
||||
{ "housingEnableDeleteHouse"sv, "1"sv },
|
||||
{ "housingEnableMoveHouse"sv, "1"sv },
|
||||
{ "housingEnableCreateCharterNeighborhood"sv, "0"sv },
|
||||
{ "housingEnableCreateGuildNeighborhood"sv, "0"sv },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user