Hola, parchee Sagrario Ruby y me dio este fallo, aver si alguien sabe como repararlo aqui la imagen:
[CENTER]http://wowglados.com/Otro/Ruby_Santacum.png[/CENTER]
Hola, parchee Sagrario Ruby y me dio este fallo, aver si alguien sabe como repararlo aqui la imagen:
[CENTER]http://wowglados.com/Otro/Ruby_Santacum.png[/CENTER]
Ves a src/server/game/Scripting/ScriptLoader.cpp.rej y ábrelo y veras que te falta por aplicar.
Gracias Gildor /emoticons/default_smile.png
De nada, ya que estamos, ¿que parche es?, ¿que tal funciona?.
Gildor una pregunta, a mi tambien me pasa lo mismo, cuando meto un parche luego me salen archivos cpp.rej, lo que no se es que cuando agrego lo que dice el archivo cpp.rej tengo que volver a parchear o defrente ya lo compilo ?
Si metes los rej, se supone que ya tienes todo metido, seria compilar y tirando.
Ok man, muchas gracias /emoticons/default_smile.png
Gildor, ayudame porfa como tengo que poner esto
Este es vehicle.cpp
[SPOILER]/*
Copyright © 2008-2010 TrinityCore http://www.trinitycore.org/
Copyright © 2005-2009 MaNGOS http://getmangos.com/
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see http://www.gnu.org/licenses/.
*/
#include “Common.h”
#include “Log.h”
#include “ObjectMgr.h”
#include “Vehicle.h”
#include “Unit.h”
#include “Util.h”
#include “WorldPacket.h”
#include “ScriptMgr.h”
#include “CreatureAI.h”
#include “ZoneScript.h”
Vehicle::Vehicle(Unit *unit, VehicleEntry const *vehInfo) : me(unit), m_vehicleInfo(vehInfo), m_usableSeatNum(0), m_bonusHP(0)
{
for (uint32 i = 0; i < MAX_VEHICLE_SEATS; ++i)
{
if (uint32 seatId = m_vehicleInfo->m_seatID)
if (VehicleSeatEntry const *veSeat = sVehicleSeatStore.LookupEntry(seatId))
{
m_Seats.insert(std::make_pair(i, VehicleSeat(veSeat)));
if (veSeat->IsUsableByPlayer())
++m_usableSeatNum;
}
}
// HACKY WAY, We must found a more generic way to handle this
// Set inmunities since db ones are rewritten with player’s ones
switch (GetVehicleInfo()->m_ID)
{
case 160:
me->SetControlled(true, UNIT_STAT_ROOT);
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true);
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK_DEST, true);
case 158:
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_HEAL, true);
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_FEAR, true);
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_PERIODIC_HEAL, true);
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_STUN, true);
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_ROOT, true);
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_DECREASE_SPEED, true);
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_CONFUSE, true);
me->ApplySpellImmune(0, IMMUNITY_ID, 49560, true); // Death Grip jump effect
break;
default:
break;
}
}
Vehicle::~Vehicle()
{
for (SeatMap::const_iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
ASSERT(!itr->second.passenger);
}
void Vehicle::Install()
{
if (Creature *pCreature = me->ToCreature())
{
switch (m_vehicleInfo->m_powerType)
{
case POWER_STEAM:
case POWER_HEAT:
case POWER_BLOOD:
case POWER_OOZE:
case POWER_WRATH:
me->setPowerType(POWER_ENERGY);
me->SetMaxPower(POWER_ENERGY, 100);
break;
case POWER_PYRITE:
me->setPowerType(POWER_ENERGY);
me->SetMaxPower(POWER_ENERGY, 50);
break;
default:
for (uint32 i = 0; i < MAX_SPELL_VEHICLE; ++i)
{
if (!pCreature->m_spells)
continue;
SpellEntry const *spellInfo = sSpellStore.LookupEntry(pCreature->m_spells);
if (!spellInfo)
continue;
if (spellInfo->powerType == POWER_MANA)
break;
if (spellInfo->powerType == POWER_ENERGY)
{
me->setPowerType(POWER_ENERGY);
me->SetMaxPower(POWER_ENERGY, 100);
break;
}
}
break;
}
}
Reset();
if (GetBase()->GetTypeId() == TYPEID_UNIT)
sScriptMgr->OnInstall(this);
}
void Vehicle::InstallAllAccessories(uint32 entry)
{
VehicleAccessoryList const* mVehicleList = sObjectMgr->GetVehicleAccessoryList(entry);
if (!mVehicleList)
return;
for (VehicleAccessoryList::const_iterator itr = mVehicleList->begin(); itr != mVehicleList->end(); ++itr)
InstallAccessory(itr->uiAccessory, itr->uiSeat, itr->bMinion);
}
void Vehicle::Uninstall()
{
sLog->outDebug(“Vehicle::Uninstall %u”, me->GetEntry());
for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
if (Unit *passenger = itr->second.passenger)
if (passenger->HasUnitTypeMask(UNIT_MASK_ACCESSORY))
passenger->ToTempSummon()->UnSummon();
RemoveAllPassengers();
if (GetBase()->GetTypeId() == TYPEID_UNIT)
sScriptMgr->OnUninstall(this);
}
void Vehicle::Die()
{
sLog->outDebug(“Vehicle::Die %u”, me->GetEntry());
for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
if (Unit *passenger = itr->second.passenger)
if (passenger->HasUnitTypeMask(UNIT_MASK_ACCESSORY))
passenger->setDeathState(JUST_DIED);
RemoveAllPassengers();
if (GetBase()->GetTypeId() == TYPEID_UNIT)
sScriptMgr->OnDie(this);
}
void Vehicle::Reset()
{
sLog->outDebug(“Vehicle::Reset”);
if (me->GetTypeId() == TYPEID_PLAYER)
{
if (m_usableSeatNum)
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PLAYER_VEHICLE);
}
else
{
InstallAllAccessories(me->GetEntry());
if (m_usableSeatNum)
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
}
if (GetBase()->GetTypeId() == TYPEID_UNIT)
sScriptMgr->OnReset(this);
}
void Vehicle::RemoveAllPassengers()
{
sLog->outDebug(“Vehicle::RemoveAllPassengers”);
for (SeatMap::iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
if (Unit *passenger = itr->second.passenger)
{
if (passenger->IsVehicle())
passenger->GetVehicleKit()->RemoveAllPassengers();
if (passenger->GetVehicle() != this)
sLog->outCrash(“Vehicle %u has invalid passenger %u.”, me->GetEntry(), passenger->GetEntry());
passenger->ExitVehicle();
if (itr->second.passenger)
{
sLog->outCrash(“Vehicle %u cannot remove passenger %u. %u is still on vehicle.”, me->GetEntry(), passenger->GetEntry(), itr->second.passenger->GetEntry());
itr->second.passenger = NULL;
}
// creature passengers mounted on player mounts should be despawned at dismount
if (GetBase()->GetTypeId() == TYPEID_PLAYER && passenger->ToCreature())
passenger->ToCreature()->ForcedDespawn();
}
}
bool Vehicle::HasEmptySeat(int8 seatId) const
{
SeatMap::const_iterator seat = m_Seats.find(seatId);
if (seat == m_Seats.end())
return false;
return !seat->second.passenger;
}
Unit *Vehicle::GetPassenger(int8 seatId) const
{
SeatMap::const_iterator seat = m_Seats.find(seatId);
if (seat == m_Seats.end())
return NULL;
return seat->second.passenger;
}
int8 Vehicle::GetNextEmptySeat(int8 seatId, bool next, bool byAura) const
{
SeatMap::const_iterator seat = m_Seats.find(seatId);
if (seat == m_Seats.end())
return -1;
while (seat->second.passenger || (!byAura && !seat->second.seatInfo->IsUsableByPlayer()) || (byAura && !seat->second.seatInfo->IsUsableByAura()))
{
sLog->outDebug(“Vehicle::GetNextEmptySeat: m_flags: %u, m_flagsB:%u”, seat->second.seatInfo->m_flags, seat->second.seatInfo->m_flagsB);
if (next)
{
++seat;
if (seat == m_Seats.end())
seat = m_Seats.begin();
}
else
{
if (seat == m_Seats.begin())
seat = m_Seats.end();
–seat;
}
if (seat->first == seatId)
return -1; // no available seat
}
return seat->first;
}
void Vehicle::InstallAccessory(uint32 entry, int8 seatId, bool minion)
{
if (Unit *passenger = GetPassenger(seatId))
{
// already installed
if (passenger->GetEntry() == entry)
{
ASSERT(passenger->GetTypeId() == TYPEID_UNIT);
if (me->GetTypeId() == TYPEID_UNIT && me->ToCreature()->IsInEvadeMode() && passenger->ToCreature()->IsAIEnabled)
passenger->ToCreature()->AI()->EnterEvadeMode();
return;
}
passenger->ExitVehicle(); // this should not happen
}
if (Creature *accessory = me->SummonCreature(entry, *me, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000))
{
if (minion)
accessory->AddUnitTypeMask(UNIT_MASK_ACCESSORY);
accessory->EnterVehicle(this, seatId);
// This is not good, we have to send update twice
accessory->SendMovementFlagUpdate();
if (GetBase()->GetTypeId() == TYPEID_UNIT)
sScriptMgr->OnInstallAccessory(this, accessory);
}
}
bool Vehicle::AddPassenger(Unit *unit, int8 seatId, bool byAura)
{
if (unit->GetVehicle() != this)
return false;
SeatMap::iterator seat;
if (seatId < 0) // no specific seat requirement
{
for (seat = m_Seats.begin(); seat != m_Seats.end(); ++seat)
if (!seat->second.passenger && ((!(byAura && seat->second.seatInfo->IsUsableByPlayer()) || (byAura && seat->second.seatInfo->IsUsableByAura()))))
break;
if (seat == m_Seats.end()) // no available seat
return false;
}
else
{
seat = m_Seats.find(seatId);
if (seat == m_Seats.end())
return false;
if (seat->second.passenger)
seat->second.passenger->ExitVehicle();
ASSERT(!seat->second.passenger);
}
sLog->outDebug(“Unit %s enter vehicle entry %u id %u dbguid %u seat %d”, unit->GetName(), me->GetEntry(), m_vehicleInfo->m_ID, me->GetGUIDLow(), (int32)seat->first);
seat->second.passenger = unit;
if (seat->second.seatInfo->IsUsableByPlayer())
{
ASSERT(m_usableSeatNum);
–m_usableSeatNum;
if (!m_usableSeatNum)
{
if (me->GetTypeId() == TYPEID_PLAYER)
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PLAYER_VEHICLE);
else
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
}
}
if (seat->second.seatInfo->m_flags && !(seat->second.seatInfo->m_flags & VEHICLE_SEAT_FLAG_UNK11))
unit->AddUnitState(UNIT_STAT_ONVEHICLE);
unit->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT);
VehicleSeatEntry const *veSeat = seat->second.seatInfo;
unit->m_movementInfo.t_pos.m_positionX = veSeat->m_attachmentOffsetX;
unit->m_movementInfo.t_pos.m_positionY = veSeat->m_attachmentOffsetY;
unit->m_movementInfo.t_pos.m_positionZ = veSeat->m_attachmentOffsetZ;
unit->m_movementInfo.t_pos.m_orientation = 0;
unit->m_movementInfo.t_time = 0; // 1 for player
unit->m_movementInfo.t_seat = seat->first;
if (me->GetTypeId() == TYPEID_UNIT
&& unit->GetTypeId() == TYPEID_PLAYER
&& seat->first == 0 && seat->second.seatInfo->m_flags & VEHICLE_SEAT_FLAG_CAN_CONTROL)
{
if (!me->SetCharmedBy(unit, CHARM_TYPE_VEHICLE))
ASSERT(false);
if (VehicleScalingInfo const *scalingInfo = sObjectMgr->GetVehicleScalingInfo(m_vehicleInfo->m_ID))
{
Player *plr = unit->ToPlayer();
float averageItemLevel = plr->GetAverageItemLevel();
if (averageItemLevel < scalingInfo->baseItemLevel)
averageItemLevel = scalingInfo->baseItemLevel;
averageItemLevel -= scalingInfo->baseItemLevel;
m_bonusHP = uint32(me->GetMaxHealth() * (averageItemLevel * scalingInfo->scalingFactor));
me->SetMaxHealth(me->GetMaxHealth() + m_bonusHP);
me->SetHealth(me->GetHealth() + m_bonusHP);
}
}
if (me->IsInWorld())
{
unit->SendMonsterMoveTransport(me);
if (me->GetTypeId() == TYPEID_UNIT)
{
if (me->ToCreature()->IsAIEnabled)
me->ToCreature()->AI()->PassengerBoarded(unit, seat->first, true);
// update all passenger’s positions
RelocatePassengers(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
}
}
unit->DestroyForNearbyPlayers();
unit->UpdateObjectVisibility(false);
if (GetBase()->GetTypeId() == TYPEID_UNIT)
sScriptMgr->OnAddPassenger(this, unit, seatId);
return true;
}
void Vehicle::RemovePassenger(Unit *unit)
{
if (unit->GetVehicle() != this)
return;
SeatMap::iterator seat;
for (seat = m_Seats.begin(); seat != m_Seats.end(); ++seat)
if (seat->second.passenger == unit)
break;
ASSERT(seat != m_Seats.end());
sLog->outDebug(“Unit %s exit vehicle entry %u id %u dbguid %u seat %d”, unit->GetName(), me->GetEntry(), m_vehicleInfo->m_ID, me->GetGUIDLow(), (int32)seat->first);
seat->second.passenger = NULL;
if (seat->second.seatInfo->IsUsableByPlayer())
{
if (!m_usableSeatNum)
{
if (me->GetTypeId() == TYPEID_PLAYER)
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PLAYER_VEHICLE);
else
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
}
++m_usableSeatNum;
}
unit->ClearUnitState(UNIT_STAT_ONVEHICLE);
if (me->GetTypeId() == TYPEID_UNIT
&& unit->GetTypeId() == TYPEID_PLAYER
&& seat->first == 0 && seat->second.seatInfo->m_flags & VEHICLE_SEAT_FLAG_CAN_CONTROL)
{
me->RemoveCharmedBy(unit);
if (m_bonusHP)
{
me->SetHealth(me->GetHealth() - m_bonusHP);
me->SetMaxHealth(me->GetMaxHealth() - m_bonusHP);
m_bonusHP = 0;
}
}
if (me->GetTypeId() == TYPEID_UNIT && me->ToCreature()->IsAIEnabled)
me->ToCreature()->AI()->PassengerBoarded(unit, seat->first, false);
// only for flyable vehicles
if (unit->HasUnitMovementFlag(MOVEMENTFLAG_FLYING))
me->CastSpell(unit, VEHICLE_SPELL_PARACHUTE, true);
if (GetBase()->GetTypeId() == TYPEID_UNIT)
sScriptMgr->OnRemovePassenger(this, unit);
}
void Vehicle::RelocatePassengers(float x, float y, float z, float ang)
{
Map *map = me->GetMap();
ASSERT(map != NULL);
// not sure that absolute position calculation is correct, it must depend on vehicle orientation and pitch angle
for (SeatMap::const_iterator itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
if (Unit *passenger = itr->second.passenger)
{
float px = x + passenger->m_movementInfo.t_pos.m_positionX;
float py = y + passenger->m_movementInfo.t_pos.m_positionY;
float pz = z + passenger->m_movementInfo.t_pos.m_positionZ;
float po = ang + passenger->m_movementInfo.t_pos.m_orientation;
passenger->SetPosition(px, py, pz, po);
}
}
void Vehicle::Dismiss()
{
sLog->outDebug(“Vehicle::Dismiss %u”, me->GetEntry());
Uninstall();
me->SendObjectDeSpawnAnim(me->GetGUID());
me->CombatStop();
me->AddObjectToRemoveList();
}
[/SPOILER]
Este es el vehicle.cpp.rej
[SPOILER]— Vehicle.cpp
+++ Vehicle.cpp
@@ -505,4 +505,30 @@ uint8 Vehicle::GetAvailableSeatCount() const
++ret;
return ret;
+}
+
+void Vehicle::Relocate(Position pos)
+{
[I]
+
[I]
[I]
[I]
vehiclePlayers.insert(GetPassenger(i));[/I]
+
[I]
[I]
+
[I]
[I]
[I]
if (Unit* plr = (*itr))[/I]
[I]
{[/I]
[I]
// relocate/setposition doesn't work for player[/I]
[I]
plr->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());[/I]
[I]
//plr->TeleportTo(pPlayer->GetMapId(), triggerPos.GetPositionX(), triggerPos.GetPositionY(), triggerPos.GetPositionZ(), triggerPos.GetOrientation(), TELE_TO_NOT_LEAVE_COMBAT);[/I]
[I]
}[/I]
[I]
+
[I]
[I]
[I]
}
\ No newline at end of file
[/SPOILER]
Archivo SpellMrg.cpp.rej
[SPOILER]— SpellMgr.cpp
+++ SpellMgr.cpp
@@ -28,6 +28,8 @@
#include “CreatureAI.h”
#include “MapManager.h”
#include “BattlegroundIC.h”
+#include “OutdoorPvPMgr.h”
+#include “OutdoorPvPWG.h”
bool IsAreaEffectTarget[TOTAL_SPELL_TARGETS];
SpellEffectTargetTypes EffectTargetType[TOTAL_SPELL_EFFECTS];
@@ -3099,6 +3101,26 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
return false;
break;
}
[I]
case 58730: // No fly Zone - Wintergrasp[/I]
[I]
{[/I]
[I]
if (!player)[/I]
[I]
return false;[/I]
+
[I]
if (sWorld->getBoolConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED))[/I]
[I]
{[/I]
[I]
OutdoorPvPWG *pvpWG = (OutdoorPvPWG*)sOutdoorPvPMgr->GetOutdoorPvPToZoneId(4197);[/I]
[I]
if ((pvpWG->isWarTime()==false) || !player || (!player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY)) || player->HasAura(45472) || player->HasAura(44795) || player->GetPositionZ() > 619.2f || player->isInFlight())[/I]
[I]
return false;[/I]
[I]
}[/I]
[I]
break;[/I]
[I]
}[/I]
[I]
case 58045: // Essence of Wintergrasp - Wintergrasp[/I]
[I]
case 57940: // Essence of Wintergrasp - Northrend[/I]
[I]
{[/I]
[I]
if (!player || player->GetTeamId() != sWorld->getWorldState(WORLDSTATE_WINTERGRASP_CONTROLING_FACTION))[/I]
[I]
return false;[/I]
[I]
break;[/I]
[I]
}[/I]
case SPELL_OIL_REFINERY: // Oil Refinery - Isle of Conquest.
case SPELL_QUARRY: // Quarry - Isle of Conquest.
{
[/SPOILER]
Quisiera que me ayudes como quedarian los archivos cpp, es que yo no se donde se pone lo que dicen en los archivos .rej
PD: El archivo SpellMrg.cpp lo subi en formato de texto porque no me permitia subirlo.
Pues te tendrías que ir al fichero que te indica y en las líneas que empiezan con un + es que tienes que añadir dichas líneas, si empiezan con un menos, es que las tienes que quitar, y las que no tienen un + ni un - son la referencia de en que línea tienes que actuar.
Si se pero con los otros archivos cpp no tuve problemas, hasta que quise modificar estos 2 que te puse, porque ya los habia modificado, pero al momento de compilar siempre me votaba error justo con estos archivos. Y por eso te pedi una ayudita como te quedarian a ti los archivos .cpp
Es que lo mismo es que el parche que estas usando no es valido, o esta desactualizado con respecto a TC, no se, pueden ser muchas cosas.
Solo me vota error con SpellMgr.cpp al momento de compilar.
Observa asi me queda mi cpp despues de agregarlo lo que me sale en el .rej
[SPOILER]bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32 newArea) const
{
OutdoorPvPWG pvpWG = (OutdoorPvPWG)sOutdoorPvPMgr->GetOutdoorPvPToZoneId(4197);
if (gender != GENDER_NONE) // not in expected gender
if (!player || gender != player->getGender())
return false;
if (raceMask) // not in expected race
if (!player || !(raceMask & player->getRaceMask()))
return false;
if (areaId) // not in expected zone
if (newZone != areaId && newArea != areaId)
return false;
if (questStart) // not in expected required quest state
if (!player || ((!questStartCanActive || !player->IsActiveQuest(questStart)) && !player->GetQuestRewardStatus(questStart)))
return false;
if (questEnd) // not in expected forbidden quest state
if (!player || player->GetQuestRewardStatus(questEnd))
return false;
if (auraSpell) // not have expected aura
if (!player || (auraSpell > 0 && !player->HasAura(auraSpell)) || (auraSpell < 0 && player->HasAura(-auraSpell)))
return false;
// Extra conditions – leaving the possibility add extra conditions…
switch(spellId)
{
case 58600: // No fly Zone - Dalaran
if (!player)
return false;
AreaTableEntry const* pArea = GetAreaEntryByAreaID(player->GetAreaId());
if (!(pArea && pArea->flags & AREA_FLAG_NO_FLY_ZONE))
return false;
if (!player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY))
return false;
break;
}
case 58730: // No fly Zone - Wintergrasp
{
if (sWorld->getBoolConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED))
{
if ((pvpWG->isWarTime()==false) || !player || (!player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY)) || player->HasAura(45472) || player->HasAura(44795) || player->GetPositionZ())
return false;
}
}
break;
case 58045: // Essence of Wintergrasp - Wintergrasp
case 57940: // Essence of Wintergrasp - Northrend
if (!player || player->GetTeamId() != sWorld->getWorldState(WORLDSTATE_WINTERGRASP_CONTROLING_FACTION))
return false;
break;
return true;
}
[/SPOILER]
Y aca el cpp.rej
[SPOILER]— SpellMgr.cpp
+++ SpellMgr.cpp
@@ -28,6 +28,8 @@
#include “CreatureAI.h”
#include “MapManager.h”
#include “BattlegroundIC.h”
+#include “OutdoorPvPMgr.h”
+#include “OutdoorPvPWG.h”
bool IsAreaEffectTarget[TOTAL_SPELL_TARGETS];
SpellEffectTargetTypes EffectTargetType[TOTAL_SPELL_EFFECTS];
@@ -3096,6 +3100,20 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
return false;
break;
}
case 58730: // No fly Zone - Wintergrasp
{
if (sWorld->getBoolConfig(CONFIG_OUTDOORPVP_WINTERGRASP_ENABLED))
{
if ((pvpWG->isWarTime()==false) || !player || (!player->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED) && !player->HasAuraType(SPELL_AURA_FLY)) || player->HasAura(45472) || player->HasAura(44795) || player->GetPositionZ())
return false;
}
}
break;
case 58045: // Essence of Wintergrasp - Wintergrasp
case 57940: // Essence of Wintergrasp - Northrend
if (!player || player->GetTeamId() != sWorld->getWorldState(WORLDSTATE_WINTERGRASP_CONTROLING_FACTION))
return false;
break;
case SPELL_OIL_REFINERY: // Oil Refinery - Isle of Conquest.
case SPELL_QUARRY: // Quarry - Isle of Conquest.
{
[/SPOILER]
Pero cuando compilo siempre me vota este error
[SPOILER]…......\Documents and Settings\Denected\Mis documentos\Trinity Core\src\server\game\Spells\SpellMgr.cpp(3102): error C2046: palabra clave case no válida
…......\Documents and Settings\Denected\Mis documentos\Trinity Core\src\server\game\Spells\SpellMgr.cpp(3110): error C2043: instrucción break no válida
…......\Documents and Settings\Denected\Mis documentos\Trinity Core\src\server\game\Spells\SpellMgr.cpp(3112): error C2046: palabra clave case no válida
…......\Documents and Settings\Denected\Mis documentos\Trinity Core\src\server\game\Spells\SpellMgr.cpp(3114): error C2046: palabra clave case no válida
…......\Documents and Settings\Denected\Mis documentos\Trinity Core\src\server\game\Spells\SpellMgr.cpp(3117): error C2043: instrucción break no válida
[/SPOILER]
En que estoy fallando ??
Creo que no lo estas metiendo en la línea adecuada, busca en tu archivo la linea:
case SPELL_OIL_REFINERY: // Oil Refinery - Isle of Conquest
Y lo pones antes de esa linea.
No hay “case SPELL_OIL_REFINERY: // Oil Refinery - Isle of Conquest” en mi archivo .cpp /emoticons/default_sad.png , sabes donde puedo conseguir el patch de wintergrasp para la rev 10870+ ???
Pues miralo en TC: https://github.com/TrinityCore/TrinityCore/blob/master/src/server/game/Spells/SpellMgr.cpp
Y buscas antes de esa línea en tu archivo.
/emoticons/default_tongue.png yo lo clone con tortoiseHg y supngo que por eso no aparece esa linea. Entonces hare un clone con git… ahora con git cuando sale un error… te vota archivos cpp.rej ??
si creo, yo por lo menos en linux si.
/emoticons/default_biggrin.png como se aplica parche con git ? que yo siempre lo hize mediante cmd.
Yo lo aplico igual, no se si en windows vale.
patch -p1 < archivo
Yo ya agregue todo los rej y al momento de compilar me sale esto
[SPOILER]error grave LNK1181: no se puede abrir el archivo entrada …/Scripts/Release/Scripts.lib
[/SPOILER]