diff --git a/doc/EventAI.txt b/doc/EventAI.txt index 0cb278853..2390bb02c 100644 --- a/doc/EventAI.txt +++ b/doc/EventAI.txt @@ -1,6 +1,6 @@ -========================================= -EventAI documentation -========================================= +============================================= +EventAI documentation: (Updated May 19, 2009) +============================================= EventAI allows users to create new creature scripts entierly within the database. @@ -67,7 +67,7 @@ Some events such as EVENT_T_AGGRO, EVENT_T_DEATH, EVENT_T_SPAWNED, and EVENT_T_E 5 EVENT_T_KILL RepeatMin, RepeatMax Expires upon killing a player. Will repeat between every (Param1) and (Param2). 6 EVENT_T_DEATH NONE Expires upon Death of the Creature. 7 EVENT_T_EVADE NONE Expires upon creature EnterEvadeMode(). -8 EVENT_T_SPELLHIT SpellID, School, RepeatMin, RepeatMax Expires upon Spell hit. If (param1) is set will only expire on that spell. If (param2) will only expire on spells of that school (-1 for all). Will repeat every (Param3) and (Param4) . +8 EVENT_T_SPELLHIT SpellID, Schoolmask, RepeatMin, RepeatMax Expires upon Spell hit. If (param1) is set will only expire on that spell. If (param2) will only expire on spells of the selected schools (-1 for all). Will repeat every (Param3) and (Param4) . 9 EVENT_T_RANGE MinDist, MaxDist, RepeatMin, RepeatMax Expires when the highest threat target distance is greater than (Param1) and less than (Param2). Will repeat every (Param3) and (Param4) . 10 EVENT_T_OOC_LOS Hostile-or-Not, MaxAllowedRange, RepeatMin, RepeatMax Expires when a Unit moves within distance(MaxAllowedRange) to creature. If Param1=0 it will expire if Unit are Hostile. If Param1=1 it will only expire if Unit are not Hostile(generally determined by faction). Will repeat every (Param3) and (Param4). Does not expire when the creature is in combat. 11 EVENT_T_SPAWNED NONE Expires at initial spawn and at creature respawn (useful for setting ranged movement type) @@ -114,7 +114,7 @@ Params are always read from Param1, then Param2, then Param3. 22 ACTION_T_SET_PHASE Phase Sets the current phase to (param1) 23 ACTION_T_INC_PHASE Value Increments the phase by (param1). May be negative to decrement phase but should not be 0. 24 ACTION_T_EVADE No Params Forces the creature to evade. Wiping all threat and dropping combat. -25 ACTION_T_FLEE No Params Causes the .creature to flee. Please use this action instead of directly casting this spell so we may change this when a more correct approach is found. +25 ACTION_T_FLEE_FOR_ASSIST No Params Causes the creature to flee for assistence (at low helth mostly). 26 ACTION_T_QUEST_EVENT_ALL QuestId Calls GroupEventHappens with (param1). Only used if it's _expected_ event should complete for all players in current party 27 ACTION_T_CASTCREATUREGO_ALL QuestId, SpellId Calls CastedCreatureOrGo for all players on the threat list with QuestID(Param1) and SpellId(Param2) 28 ACTION_T_REMOVEAURASFROMSPELL Target, Spellid Removes all auras on Target caused by Spellid @@ -128,6 +128,7 @@ Params are always read from Param1, then Param2, then Param3. 36 ACTION_T_UPDATE_TEMPLATE TemplateId, Team Changes the creature to a new creature template of (param1) with team = Alliance if (param2) = false or Horde if (param2) = true 37 ACTION_T_DIE No Params Kills the creature 38 ACTION_T_ZONE_COMBAT_PULSE No Params Places all players within the instance into combat with the creature. Only works in combat and only works inside of instances. +39 ACTION_T_CALL_FOR_HELP Radius Call any friendly creatures (if its not in combat/etc) in radius attack creature target. * = Use -1 to specify that if this param is picked to do nothing. Random is constant between actions within an event. So if you have a random Yell and a random Sound they will match up (ex: param2 with param2) @@ -219,9 +220,19 @@ Parameter 2: School - Spell School to trigger the event (NOTE: If you use a Spel Parameter 3: RepeatMin - Minimum Time used to calculate Random Repeat Expire Parameter 4: RepeatMax - Maximum Time used to calculate Random Repeat Expire -BOTH - Expires upon Spell hit. If (param1) is set will only expire on that spell. If (param2) will only expire on spells of that school. Will repeat every (Param3) and (Param4). +BOTH - Expires upon Spell hit. If (param1) is set will only expire on that spell OR If (param2) is set it will only expire on spells of that school. Will repeat every (Param3) and (Param4). This Event is commonly used for NPC's who can do special things when you cast a spell (Or specific spell) on them. +(name, school, schoolmask) +SPELL_SCHOOL_NORMAL = 0, ==> 1 +SPELL_SCHOOL_HOLY = 1, ==> 2 +SPELL_SCHOOL_FIRE = 2, ==> 4 +SPELL_SCHOOL_NATURE = 3, ==> 8 +SPELL_SCHOOL_FROST = 4, ==> 16 +SPELL_SCHOOL_SHADOW = 5, ==> 32 +SPELL_SCHOOL_ARCANE = 6, ==> 64 +Use These Values For Schoolmask (Param2) or Any Combinations Of These Schoolmasks for Multiple Schools. + ------------------ 9 = EVENT_T_RANGE: ------------------ @@ -249,6 +260,8 @@ This Event is commonly used for NPC's who do something or say something to you w --------------------- Expires at initial spawn and at creature respawn. This Event is commonly used for setting ranged movement type or Summoning a Pet on Spawn +Parameter 1: 0: works always, 1: works on map in Parameter 2, 2: works on zone/subzone in Parameter 2 +Parameter 2: depends on Parameter 1: for 1 it is map ID, for 2 it is area ID to check ----------------------- 12 = EVENT_T_TARGET_HP: diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp index 0d39a6de2..3fdbcd378 100644 --- a/src/game/AuctionHouseMgr.cpp +++ b/src/game/AuctionHouseMgr.cpp @@ -660,7 +660,7 @@ bool AuctionEntry::BuildAuctionInfo(WorldPacket & data) const uint32 AuctionEntry::GetAuctionCut() const { - return uint32(auctionHouseEntry->cutPercent * bid * sWorld.getRate(RATE_AUCTION_CUT) / 100.f); + return uint32(auctionHouseEntry->cutPercent * bid * sWorld.getRate(RATE_AUCTION_CUT) / 100.0f); } /// the sum of outbid is (1% from current bid)*5, if bid is very small, it is 1c diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index 761e970fe..e2c513700 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -1463,6 +1463,7 @@ Creature* BattleGround::AddCreature(uint32 entry, uint32 type, uint32 teamval, f if (!pCreature->IsPositionValid()) { sLog.outError("Creature (guidlow %d, entry %d) not added to battleground. Suggested coordinates isn't valid (X: %f Y: %f)",pCreature->GetGUIDLow(),pCreature->GetEntry(),pCreature->GetPositionX(),pCreature->GetPositionY()); + delete pCreature; return NULL; } diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index fbdbd9eb4..5cd1a0add 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -85,8 +85,7 @@ VendorItem const* VendorItemData::FindItem(uint32 item_id) const bool AssistDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/) { - Unit* victim = Unit::GetUnit(m_owner, m_victim); - if (victim) + if(Unit* victim = Unit::GetUnit(m_owner, m_victim)) { while (!m_assistants.empty()) { @@ -112,7 +111,7 @@ m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_resp m_gossipOptionLoaded(false), m_isPet(false), m_isVehicle(false), m_isTotem(false), m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_AlreadyCallAssistance(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL), -m_creatureInfo(NULL), m_isActiveObject(false) +m_creatureInfo(NULL), m_isActiveObject(false), m_AlreadySearchedAssistance(false) { m_regenTimer = 200; m_valuesCount = UNIT_END; @@ -507,6 +506,36 @@ void Creature::RegenerateHealth() ModifyHealth(addvalue); } +void Creature::DoFleeToGetAssistance() +{ + if (!getVictim()) + return; + + float radius = sWorld.getConfig(CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS); + if (radius >0) + { + Creature* pCreature = NULL; + + CellPair p(MaNGOS::ComputeCellPair(GetPositionX(), GetPositionY())); + Cell cell(p); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + MaNGOS::NearestAssistCreatureInCreatureRangeCheck u_check(this, getVictim(), radius); + MaNGOS::CreatureLastSearcher searcher(this, pCreature, u_check); + + TypeContainerVisitor, GridTypeMapContainer > grid_creature_searcher(searcher); + + CellLock cell_lock(cell, p); + cell_lock->Visit(cell_lock, grid_creature_searcher, *GetMap()); + + SetNoSearchAssistance(true); + if(!pCreature) + SetFeared(true, getVictim()->GetGUID(), 0 ,sWorld.getConfig(CONFIG_CREATURE_FAMILY_FLEE_DELAY)); + else + GetMotionMaster()->MoveSeekAssistance(pCreature->GetPositionX(), pCreature->GetPositionY(), pCreature->GetPositionZ()); + } +} + bool Creature::AIM_Initialize() { // make sure nothing can change the AI during AI update @@ -1474,6 +1503,7 @@ void Creature::setDeathState(DeathState s) if (canFly() && FallGround()) return; + SetNoSearchAssistance(false); Unit::setDeathState(CORPSE); } if(s == JUST_ALIVED) @@ -1725,26 +1755,34 @@ void Creature::CallAssistance() } } -bool Creature::CanAssistTo(const Unit* u, const Unit* enemy) const +bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /*= true*/) const { // we don't need help from zombies :) - if( !isAlive() ) + if (!isAlive()) return false; // skip fighting creature - if( isInCombat() ) - return false; - - // only from same creature faction - if(getFaction() != u->getFaction() ) + if (isInCombat()) return false; // only free creature - if( GetCharmerOrOwnerGUID() ) + if (GetCharmerOrOwnerGUID()) return false; + // only from same creature faction + if (checkfaction) + { + if (getFaction() != u->getFaction()) + return false; + } + else + { + if (!IsFriendlyTo(u)) + return false; + } + // skip non hostile to caster enemy creatures - if( !IsHostileTo(enemy) ) + if (!IsHostileTo(enemy)) return false; return true; diff --git a/src/game/Creature.h b/src/game/Creature.h index c71106a8d..64fe08399 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -601,9 +601,12 @@ class MANGOS_DLL_SPEC Creature : public Unit float GetAttackDistance(Unit const* pl) const; + void DoFleeToGetAssistance(); void CallAssistance(); void SetNoCallAssistance(bool val) { m_AlreadyCallAssistance = val; } - bool CanAssistTo(const Unit* u, const Unit* enemy) const; + void SetNoSearchAssistance(bool val) { m_AlreadySearchedAssistance = val; } + bool HasSearchedAssistance() { return m_AlreadySearchedAssistance; } + bool CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction = true) const; MovementGeneratorType GetDefaultMovementType() const { return m_defaultMovementType; } void SetDefaultMovementType(MovementGeneratorType mgt) { m_defaultMovementType = mgt; } @@ -694,6 +697,7 @@ class MANGOS_DLL_SPEC Creature : public Unit uint32 m_equipmentId; bool m_AlreadyCallAssistance; + bool m_AlreadySearchedAssistance; bool m_regenHealth; bool m_AI_locked; bool m_isDeadByDefault; diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp index 9e663107f..5a1cf5716 100644 --- a/src/game/CreatureEventAI.cpp +++ b/src/game/CreatureEventAI.cpp @@ -30,6 +30,40 @@ #include "WorldPacket.h" #include "InstanceData.h" +namespace MaNGOS +{ + class CallOfHelpCreatureInRangeDo // do attack at call of help to friendly crearture + { + public: + CallOfHelpCreatureInRangeDo(Unit* funit, Unit* enemy, float range) + : i_funit(funit), i_enemy(enemy), i_range(range) + {} + void operator()(Creature* u) + { + if (u == i_funit) + return; + + if (!u->CanAssistTo(i_funit, i_enemy, false)) + return; + + // too far + if( !i_funit->IsWithinDistInMap(u, i_range) ) + return; + + // only if see assisted creature + if( !i_funit->IsWithinLOSInMap(u) ) + return; + + if(u->AI()) + u->AI()->AttackStart(i_enemy); + } + private: + Unit* const i_funit; + Unit* const i_enemy; + float i_range; + }; +} + bool CreatureEventAIHolder::UpdateRepeatTimer( Creature* creature, uint32 repeatMin, uint32 repeatMax ) { if (repeatMin == repeatMax) @@ -98,10 +132,8 @@ CreatureEventAI::CreatureEventAI(Creature *c ) : CreatureAI(c) if (!bEmptyList) { for (std::list::iterator i = CreatureEventAIList.begin(); i != CreatureEventAIList.end(); ++i) - { - if ((*i).Event.event_type == EVENT_T_SPAWNED) + if (SpawnedEventConditionsCheck((*i).Event)) ProcessEvent(*i); - } } Reset(); } @@ -589,9 +621,8 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 case ACTION_T_EVADE: EnterEvadeMode(); break; - case ACTION_T_FLEE: - //TODO: Replace with Flee movement generator - m_creature->CastSpell(m_creature, SPELL_RUN_AWAY, true); + case ACTION_T_FLEE_FOR_ASSIST: + m_creature->DoFleeToGetAssistance(); break; case ACTION_T_QUEST_EVENT_ALL: if (pActionInvoker && pActionInvoker->GetTypeId() == TYPEID_PLAYER) @@ -705,7 +736,6 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 break; } case ACTION_T_UPDATE_TEMPLATE: - { if (m_creature->GetEntry() == action.update_template.creatureId) { @@ -714,10 +744,8 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 } m_creature->UpdateEntry(action.update_template.creatureId, action.update_template.team ? HORDE : ALLIANCE); - } - break; + break; case ACTION_T_DIE: - { if (m_creature->isDead()) { @@ -725,10 +753,8 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 return; } m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - break; + break; case ACTION_T_ZONE_COMBAT_PULSE: - { if (!m_creature->isInCombat() || !m_creature->GetMap()->IsDungeon()) { @@ -737,8 +763,26 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32 } DoZoneInCombat(m_creature); + break; + case ACTION_T_CALL_FOR_HELP: + { + if (!m_creature->getVictim()) + return; + + CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); + Cell cell(p); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + MaNGOS::CallOfHelpCreatureInRangeDo u_do(m_creature, m_creature->getVictim(), action.call_for_help.radius); + MaNGOS::CreatureWorker worker(m_creature, u_do); + + TypeContainerVisitor, GridTypeMapContainer > grid_creature_searcher(worker); + + CellLock cell_lock(cell, p); + cell_lock->Visit(cell_lock, grid_creature_searcher, *m_creature->GetMap()); + break; } - break; } } @@ -751,10 +795,8 @@ void CreatureEventAI::JustRespawned() //Handle Spawned Events for (std::list::iterator i = CreatureEventAIList.begin(); i != CreatureEventAIList.end(); ++i) - { - if ((*i).Event.event_type == EVENT_T_SPAWNED) + if (SpawnedEventConditionsCheck((*i).Event)) ProcessEvent(*i); - } } void CreatureEventAI::Reset() @@ -1364,3 +1406,30 @@ void CreatureEventAI::ReceiveEmote(Player* pPlayer, uint32 text_emote) } } } + +bool CreatureEventAI::SpawnedEventConditionsCheck(CreatureEventAI_Event const& event) +{ + if(event.event_type != EVENT_T_SPAWNED) + return false; + + switch (event.spawned.condition) + { + case SPAWNED_EVENT_ALWAY: + // always + return true; + case SPAWNED_EVENT_MAP: + // map ID check + return m_creature->GetMapId() == event.spawned.conditionValue1; + case SPAWNED_EVENT_ZONE: + { + // zone ID check + uint32 zone, area; + m_creature->GetZoneAndAreaId(zone,area); + return zone == event.spawned.conditionValue1 || area == event.spawned.conditionValue1; + } + default: + break; + } + + return false; +} diff --git a/src/game/CreatureEventAI.h b/src/game/CreatureEventAI.h index d357e5829..5f967c51d 100644 --- a/src/game/CreatureEventAI.h +++ b/src/game/CreatureEventAI.h @@ -28,7 +28,6 @@ class Player; class WorldObject; #define EVENT_UPDATE_TIME 500 -#define SPELL_RUN_AWAY 8225 #define MAX_ACTIONS 3 #define MAX_PHASE 32 @@ -45,7 +44,7 @@ enum EventAI_Type EVENT_T_SPELLHIT = 8, // SpellID, School, RepeatMin, RepeatMax EVENT_T_RANGE = 9, // MinDist, MaxDist, RepeatMin, RepeatMax EVENT_T_OOC_LOS = 10, // NoHostile, MaxRnage, RepeatMin, RepeatMax - EVENT_T_SPAWNED = 11, // NONE + EVENT_T_SPAWNED = 11, // Condition, CondValue1 EVENT_T_TARGET_HP = 12, // HPMax%, HPMin%, RepeatMin, RepeatMax EVENT_T_TARGET_CASTING = 13, // RepeatMin, RepeatMax EVENT_T_FRIENDLY_HP = 14, // HPDeficit, Radius, RepeatMin, RepeatMax @@ -63,45 +62,46 @@ enum EventAI_Type enum EventAI_ActionType { - ACTION_T_NONE = 0, //*No action - ACTION_T_TEXT = 1, //*-TextId1, optionally -TextId2, optionally -TextId3(if -TextId2 exist). If more than just -TextId1 is defined, randomize. Negative values. - ACTION_T_SET_FACTION = 2, //*FactionId (or 0 for default) - ACTION_T_MORPH_TO_ENTRY_OR_MODEL = 3, //*Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph) - ACTION_T_SOUND = 4, //*SoundId - ACTION_T_EMOTE = 5, //*EmoteId - ACTION_T_RANDOM_SAY = 6, //*UNUSED - ACTION_T_RANDOM_YELL = 7, //*UNUSED - ACTION_T_RANDOM_TEXTEMOTE = 8, //*UNUSED - ACTION_T_RANDOM_SOUND = 9, //SoundId1, SoundId2, SoundId3 (-1 in any field means no output if randomed that field) - ACTION_T_RANDOM_EMOTE = 10, //*EmoteId1, EmoteId2, EmoteId3 (-1 in any field means no output if randomed that field) - ACTION_T_CAST = 11, //*SpellId, Target, CastFlags - ACTION_T_SUMMON = 12, //*CreatureID, Target, Duration in ms - ACTION_T_THREAT_SINGLE_PCT = 13, //*Threat%, Target - ACTION_T_THREAT_ALL_PCT = 14, //Threat% - ACTION_T_QUEST_EVENT = 15, //*QuestID, Target - ACTION_T_CAST_EVENT = 16, //*QuestID, SpellId, Target - must be removed as hack? - ACTION_T_SET_UNIT_FIELD = 17, //*Field_Number, Value, Target - ACTION_T_SET_UNIT_FLAG = 18, //*Flags (may be more than one field OR'd together), Target - ACTION_T_REMOVE_UNIT_FLAG = 19, //*Flags (may be more than one field OR'd together), Target - ACTION_T_AUTO_ATTACK = 20, //AllowAttackState (0 = stop attack, anything else means continue attacking) - ACTION_T_COMBAT_MOVEMENT = 21, //AllowCombatMovement (0 = stop combat based movement, anything else continue attacking) - ACTION_T_SET_PHASE = 22, //*Phase - ACTION_T_INC_PHASE = 23, //*Value (may be negative to decrement phase, should not be 0) - ACTION_T_EVADE = 24, //No Params - ACTION_T_FLEE = 25, //No Params - ACTION_T_QUEST_EVENT_ALL = 26, //*QuestID - ACTION_T_CAST_EVENT_ALL = 27, //*QuestId, SpellId - ACTION_T_REMOVEAURASFROMSPELL = 28, //*Target, Spellid - ACTION_T_RANGED_MOVEMENT = 29, //Distance, Angle - ACTION_T_RANDOM_PHASE = 30, //PhaseId1, PhaseId2, PhaseId3 - ACTION_T_RANDOM_PHASE_RANGE = 31, //PhaseMin, PhaseMax - ACTION_T_SUMMON_ID = 32, //*CreatureId, Target, SpawnId - ACTION_T_KILLED_MONSTER = 33, //*CreatureId, Target - ACTION_T_SET_INST_DATA = 34, //*Field, Data - ACTION_T_SET_INST_DATA64 = 35, //*Field, Target - ACTION_T_UPDATE_TEMPLATE = 36, //*Entry, Team - ACTION_T_DIE = 37, //No Params - ACTION_T_ZONE_COMBAT_PULSE = 38, //No Params + ACTION_T_NONE = 0, // No action + ACTION_T_TEXT = 1, // TextId1, optionally -TextId2, optionally -TextId3(if -TextId2 exist). If more than just -TextId1 is defined, randomize. Negative values. + ACTION_T_SET_FACTION = 2, // FactionId (or 0 for default) + ACTION_T_MORPH_TO_ENTRY_OR_MODEL = 3, // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph) + ACTION_T_SOUND = 4, // SoundId + ACTION_T_EMOTE = 5, // EmoteId + ACTION_T_RANDOM_SAY = 6, // UNUSED + ACTION_T_RANDOM_YELL = 7, // UNUSED + ACTION_T_RANDOM_TEXTEMOTE = 8, // UNUSED + ACTION_T_RANDOM_SOUND = 9, // SoundId1, SoundId2, SoundId3 (-1 in any field means no output if randomed that field) + ACTION_T_RANDOM_EMOTE = 10, // EmoteId1, EmoteId2, EmoteId3 (-1 in any field means no output if randomed that field) + ACTION_T_CAST = 11, // SpellId, Target, CastFlags + ACTION_T_SUMMON = 12, // CreatureID, Target, Duration in ms + ACTION_T_THREAT_SINGLE_PCT = 13, // Threat%, Target + ACTION_T_THREAT_ALL_PCT = 14, // Threat% + ACTION_T_QUEST_EVENT = 15, // QuestID, Target + ACTION_T_CAST_EVENT = 16, // QuestID, SpellId, Target - must be removed as hack? + ACTION_T_SET_UNIT_FIELD = 17, // Field_Number, Value, Target + ACTION_T_SET_UNIT_FLAG = 18, // Flags (may be more than one field OR'd together), Target + ACTION_T_REMOVE_UNIT_FLAG = 19, // Flags (may be more than one field OR'd together), Target + ACTION_T_AUTO_ATTACK = 20, // AllowAttackState (0 = stop attack, anything else means continue attacking) + ACTION_T_COMBAT_MOVEMENT = 21, // AllowCombatMovement (0 = stop combat based movement, anything else continue attacking) + ACTION_T_SET_PHASE = 22, // Phase + ACTION_T_INC_PHASE = 23, // Value (may be negative to decrement phase, should not be 0) + ACTION_T_EVADE = 24, // No Params + ACTION_T_FLEE_FOR_ASSIST = 25, // No Params + ACTION_T_QUEST_EVENT_ALL = 26, // QuestID + ACTION_T_CAST_EVENT_ALL = 27, // CreatureId, SpellId + ACTION_T_REMOVEAURASFROMSPELL = 28, // Target, Spellid + ACTION_T_RANGED_MOVEMENT = 29, // Distance, Angle + ACTION_T_RANDOM_PHASE = 30, // PhaseId1, PhaseId2, PhaseId3 + ACTION_T_RANDOM_PHASE_RANGE = 31, // PhaseMin, PhaseMax + ACTION_T_SUMMON_ID = 32, // CreatureId, Target, SpawnId + ACTION_T_KILLED_MONSTER = 33, // CreatureId, Target + ACTION_T_SET_INST_DATA = 34, // Field, Data + ACTION_T_SET_INST_DATA64 = 35, // Field, Target + ACTION_T_UPDATE_TEMPLATE = 36, // Entry, Team + ACTION_T_DIE = 37, // No Params + ACTION_T_ZONE_COMBAT_PULSE = 38, // No Params + ACTION_T_CALL_FOR_HELP = 39, // Radius ACTION_T_END, }; @@ -155,6 +155,13 @@ enum EventFlags EFLAG_DEBUG_ONLY = 0x80, //Event only occurs in debug build }; +enum SpawnedEventMode +{ + SPAWNED_EVENT_ALWAY = 0, + SPAWNED_EVENT_MAP = 1, + SPAWNED_EVENT_ZONE = 2 +}; + // String text additional data, used in (CreatureEventAI) struct StringTextData { @@ -346,12 +353,17 @@ struct CreatureEventAI_Action uint32 field; uint32 target; } set_inst_data64; - // ACTION_T_UPDATE_TEMPLATE = 36, //*Entry, Team + // ACTION_T_UPDATE_TEMPLATE = 36 struct { uint32 creatureId; uint32 team; } update_template; + // ACTION_T_CALL_FOR_HELP = 39 + struct + { + uint32 radius; + } call_for_help; // RAW struct { @@ -426,6 +438,12 @@ struct CreatureEventAI_Event uint32 repeatMin; uint32 repeatMax; } ooc_los; + // EVENT_T_SPAWNED = 11 + struct + { + uint32 condition; + uint32 conditionValue1; + } spawned; // EVENT_T_TARGET_CASTING = 13 struct { @@ -556,6 +574,8 @@ class MANGOS_DLL_SPEC CreatureEventAI : public CreatureAI void DoMeleeAttackIfReady(); bool CanCast(Unit* Target, SpellEntry const *Spell, bool Triggered); + bool SpawnedEventConditionsCheck(CreatureEventAI_Event const& event); + Unit* DoSelectLowestHpFriendly(float range, uint32 MinHPDiff); void DoFindFriendlyMissingBuff(std::list& _list, float range, uint32 spellid); void DoFindFriendlyCC(std::list& _list, float range); diff --git a/src/game/CreatureEventAIMgr.cpp b/src/game/CreatureEventAIMgr.cpp index b870ff4e4..b3678dad6 100644 --- a/src/game/CreatureEventAIMgr.cpp +++ b/src/game/CreatureEventAIMgr.cpp @@ -283,6 +283,23 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() if (temp.ooc_los.repeatMax < temp.ooc_los.repeatMin) sLog.outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); break; + case EVENT_T_SPAWNED: + switch(temp.spawned.condition) + { + case SPAWNED_EVENT_ALWAY: + break; + case SPAWNED_EVENT_MAP: + if(!sMapStore.LookupEntry(temp.spawned.conditionValue1)) + sLog.outErrorDb("CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'map specific' but with not existed map (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1); + break; + case SPAWNED_EVENT_ZONE: + if(!GetAreaEntryByAreaID(temp.spawned.conditionValue1)) + sLog.outErrorDb("CreatureEventAI: Creature %u are using spawned event(%u) with param1 = %u 'area specific' but with not existed area (%u) in param2. Event will never repeat.", temp.creature_id, i, temp.spawned.condition, temp.spawned.conditionValue1); + default: + sLog.outErrorDb("CreatureEventAI: Creature %u are using invalid spawned event %u mode (%u) in param1", temp.creature_id, i, temp.spawned.condition); + break; + } + break; case EVENT_T_FRIENDLY_HP: if (temp.friendly_hp.repeatMax < temp.friendly_hp.repeatMin) sLog.outErrorDb("CreatureEventAI: Creature %u are using repeatable event(%u) with param4 < param3 (RepeatMax < RepeatMin). Event will never repeat.", temp.creature_id, i); @@ -327,7 +344,6 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() case EVENT_T_AGGRO: case EVENT_T_DEATH: case EVENT_T_EVADE: - case EVENT_T_SPAWNED: case EVENT_T_REACHED_HOME: { if (temp.event_flags & EFLAG_REPEATABLE) @@ -626,12 +642,13 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() sLog.outErrorDb("CreatureEventAI: Event %u Action %u uses non-existant creature entry %u.", i, j+1, action.update_template.creatureId); break; case ACTION_T_EVADE: //No Params - case ACTION_T_FLEE: //No Params + case ACTION_T_FLEE_FOR_ASSIST: //No Params case ACTION_T_DIE: //No Params case ACTION_T_ZONE_COMBAT_PULSE: //No Params case ACTION_T_AUTO_ATTACK: //AllowAttackState (0 = stop attack, anything else means continue attacking) case ACTION_T_COMBAT_MOVEMENT: //AllowCombatMovement (0 = stop combat based movement, anything else continue attacking) case ACTION_T_RANGED_MOVEMENT: //Distance, Angle + case ACTION_T_CALL_FOR_HELP: //Distance break; case ACTION_T_RANDOM_SAY: diff --git a/src/game/FleeingMovementGenerator.cpp b/src/game/FleeingMovementGenerator.cpp index 542c75c98..373d85660 100644 --- a/src/game/FleeingMovementGenerator.cpp +++ b/src/game/FleeingMovementGenerator.cpp @@ -17,6 +17,7 @@ */ #include "Creature.h" +#include "CreatureAI.h" #include "MapManager.h" #include "FleeingMovementGenerator.h" #include "DestinationHolderImp.h" @@ -384,3 +385,33 @@ template void FleeingMovementGenerator::Reset(Player &); template void FleeingMovementGenerator::Reset(Creature &); template bool FleeingMovementGenerator::Update(Player &, const uint32 &); template bool FleeingMovementGenerator::Update(Creature &, const uint32 &); + +void TimedFleeingMovementGenerator::Finalize(Unit &owner) +{ + owner.clearUnitState(UNIT_STAT_FLEEING); + if (Unit* victim = owner.getVictim()) + { + if (owner.isAlive()) + { + owner.AttackStop(true); + ((Creature*)&owner)->AI()->AttackStart(victim); + } + } +} + +bool TimedFleeingMovementGenerator::Update(Unit & owner, const uint32 & time_diff) +{ + if( !owner.isAlive() ) + return false; + + if( owner.hasUnitState(UNIT_STAT_ROOT | UNIT_STAT_STUNNED) ) + return true; + + i_totalFleeTime.Update(time_diff); + if (i_totalFleeTime.Passed()) + return false; + + // This calls grant-parent Update method hiden by FleeingMovementGenerator::Update(Creature &, const uint32 &) version + // This is done instead of casting Unit& to Creature& and call parent method, then we can use Unit directly + return MovementGeneratorMedium< Creature, FleeingMovementGenerator >::Update(owner, time_diff); +} diff --git a/src/game/FleeingMovementGenerator.h b/src/game/FleeingMovementGenerator.h index c402a3a4c..a91b3cc1c 100644 --- a/src/game/FleeingMovementGenerator.h +++ b/src/game/FleeingMovementGenerator.h @@ -58,4 +58,21 @@ class MANGOS_DLL_SPEC FleeingMovementGenerator DestinationHolder< Traveller > i_destinationHolder; }; + +class MANGOS_DLL_SPEC TimedFleeingMovementGenerator +: public FleeingMovementGenerator +{ + public: + TimedFleeingMovementGenerator(uint64 fright, uint32 time) : + FleeingMovementGenerator(fright), + i_totalFleeTime(time) {} + + MovementGeneratorType GetMovementGeneratorType() { return TIMED_FLEEING_MOTION_TYPE; } + bool Update(Unit &, const uint32 &); + void Finalize(Unit &); + + private: + TimeTracker i_totalFleeTime; +}; + #endif diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h index d8798d58b..b7b04ef5e 100644 --- a/src/game/GridNotifiers.h +++ b/src/game/GridNotifiers.h @@ -445,6 +445,25 @@ namespace MaNGOS template void Visit(GridRefManager &) {} }; + template + struct MANGOS_DLL_DECL CreatureWorker + { + uint32 i_phaseMask; + Do& i_do; + + CreatureWorker(WorldObject const* searcher, Do& _do) + : i_phaseMask(searcher->GetPhaseMask()), i_do(_do) {} + + void Visit(CreatureMapType &m) + { + for(CreatureMapType::iterator itr=m.begin(); itr != m.end(); ++itr) + if(itr->getSource()->InSamePhase(i_phaseMask)) + i_do(itr->getSource()); + } + + template void Visit(GridRefManager &) {} + }; + // Player searchers template @@ -895,6 +914,38 @@ namespace MaNGOS float i_range; }; + class NearestAssistCreatureInCreatureRangeCheck + { + public: + NearestAssistCreatureInCreatureRangeCheck(Creature* obj, Unit* enemy, float range) + : i_obj(obj), i_enemy(enemy), i_range(range) {} + + bool operator()(Creature* u) + { + if(u == i_obj) + return false; + if(!u->CanAssistTo(i_obj,i_enemy)) + return false; + + if(!i_obj->IsWithinDistInMap(u, i_range)) + return false; + + if(!i_obj->IsWithinLOSInMap(u)) + return false; + + i_range = i_obj->GetDistance(u); // use found unit range as new range limit for next check + return true; + } + float GetLastRange() const { return i_range; } + private: + Creature* const i_obj; + Unit* const i_enemy; + float i_range; + + // prevent clone this object + NearestAssistCreatureInCreatureRangeCheck(NearestAssistCreatureInCreatureRangeCheck const&); + }; + // Success at unit in range, range update for next check (this can be use with CreatureLastSearcher to find nearest creature) class NearestCreatureEntryWithLiveStateInObjectRangeCheck { diff --git a/src/game/IdleMovementGenerator.cpp b/src/game/IdleMovementGenerator.cpp index 085ab46e7..902059528 100644 --- a/src/game/IdleMovementGenerator.cpp +++ b/src/game/IdleMovementGenerator.cpp @@ -17,7 +17,8 @@ */ #include "IdleMovementGenerator.h" -#include "Unit.h" +#include "CreatureAI.h" +#include "Creature.h" IdleMovementGenerator si_idleMovement; @@ -47,3 +48,17 @@ DistractMovementGenerator::Update(Unit& /*owner*/, const uint32& time_diff) m_timer -= time_diff; return true; } + +void +AssistanceDistractMovementGenerator::Finalize(Unit &unit) +{ + unit.clearUnitState(UNIT_STAT_DISTRACTED); + if (Unit* victim = unit.getVictim()) + { + if (unit.isAlive()) + { + unit.AttackStop(true); + ((Creature*)&unit)->AI()->AttackStart(victim); + } + } +} diff --git a/src/game/IdleMovementGenerator.h b/src/game/IdleMovementGenerator.h index e602f8ef8..82d131a3b 100644 --- a/src/game/IdleMovementGenerator.h +++ b/src/game/IdleMovementGenerator.h @@ -49,4 +49,14 @@ class MANGOS_DLL_SPEC DistractMovementGenerator : public MovementGenerator uint32 m_timer; }; +class MANGOS_DLL_SPEC AssistanceDistractMovementGenerator : public DistractMovementGenerator +{ + public: + AssistanceDistractMovementGenerator(uint32 timer) : + DistractMovementGenerator(timer) {} + + MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_DISTRACT_MOTION_TYPE; } + void Finalize(Unit& unit); +}; + #endif diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index a0789e851..fc8d66666 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -239,7 +239,7 @@ void LootStore::ReportNotExistedId(uint32 id) const // RATE_DROP_ITEMS is no longer used for all types of entries bool LootStoreItem::Roll(bool rate) const { - if(chance>=100.f) + if(chance>=100.0f) return true; if(mincountOrRef < 0) // reference case @@ -817,7 +817,7 @@ LootStoreItem const * LootTemplate::LootGroup::Roll() const for (uint32 i=0; i=100.f) + if(ExplicitlyChanced[i].chance>=100.0f) return &ExplicitlyChanced[i]; Roll -= ExplicitlyChanced[i].chance; diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp index e693484b2..54bfb4410 100644 --- a/src/game/MotionMaster.cpp +++ b/src/game/MotionMaster.cpp @@ -331,7 +331,37 @@ MotionMaster::MovePoint(uint32 id, float x, float y, float z) } void -MotionMaster::MoveFleeing(Unit* enemy) +MotionMaster::MoveSeekAssistance(float x, float y, float z) +{ + if(i_owner->GetTypeId()==TYPEID_PLAYER) + { + sLog.outError("Player (GUID: %u) attempt to seek assistance",i_owner->GetGUIDLow()); + } + else + { + DEBUG_LOG("Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)", + i_owner->GetEntry(), i_owner->GetGUIDLow(), x, y, z ); + Mutate(new AssistanceMovementGenerator(x,y,z)); + } +} + +void +MotionMaster::MoveSeekAssistanceDistract(uint32 time) +{ + if(i_owner->GetTypeId()==TYPEID_PLAYER) + { + sLog.outError("Player (GUID: %u) attempt to call distract after assistance",i_owner->GetGUIDLow()); + } + else + { + DEBUG_LOG("Creature (Entry: %u GUID: %u) is distracted after assistance call (Time: %u)", + i_owner->GetEntry(), i_owner->GetGUIDLow(), time ); + Mutate(new AssistanceDistractMovementGenerator(time)); + } +} + +void +MotionMaster::MoveFleeing(Unit* enemy, uint32 time) { if(!enemy) return; @@ -345,11 +375,15 @@ MotionMaster::MoveFleeing(Unit* enemy) } else { - DEBUG_LOG("Creature (Entry: %u GUID: %u) flee from %s (GUID: %u)", + DEBUG_LOG("Creature (Entry: %u GUID: %u) flee from %s (GUID: %u)%s", i_owner->GetEntry(), i_owner->GetGUIDLow(), enemy->GetTypeId()==TYPEID_PLAYER ? "player" : "creature", - enemy->GetTypeId()==TYPEID_PLAYER ? enemy->GetGUIDLow() : ((Creature*)enemy)->GetDBTableGUIDLow() ); - Mutate(new FleeingMovementGenerator(enemy->GetGUID())); + enemy->GetTypeId()==TYPEID_PLAYER ? enemy->GetGUIDLow() : ((Creature*)enemy)->GetDBTableGUIDLow(), + time ? " for a limited time" : ""); + if (time) + Mutate(new TimedFleeingMovementGenerator(enemy->GetGUID(), time)); + else + Mutate(new FleeingMovementGenerator(enemy->GetGUID())); } } diff --git a/src/game/MotionMaster.h b/src/game/MotionMaster.h index a1a4a55a3..d304d9db5 100644 --- a/src/game/MotionMaster.h +++ b/src/game/MotionMaster.h @@ -44,6 +44,9 @@ enum MovementGeneratorType POINT_MOTION_TYPE = 8, // PointMovementGenerator.h FLEEING_MOTION_TYPE = 9, // FleeingMovementGenerator.h DISTRACT_MOTION_TYPE = 10, // IdleMovementGenerator.h + ASSISTANCE_MOTION_TYPE= 11, // PointMovementGenerator.h (first part of flee for assistance) + ASSISTANCE_DISTRACT_MOTION_TYPE = 12, // IdleMovementGenerator.h (second part of flee for assistance) + TIMED_FLEEING_MOTION_TYPE = 13, // FleeingMovementGenerator.h (alt.second part of flee for assistance) }; enum MMCleanFlag @@ -107,8 +110,10 @@ class MANGOS_DLL_SPEC MotionMaster : private std::stack void MoveFollow(Unit* target, float dist, float angle); void MoveChase(Unit* target, float dist = 0.0f, float angle = 0.0f); void MoveConfused(); - void MoveFleeing(Unit* enemy); + void MoveFleeing(Unit* enemy, uint32 time = 0); void MovePoint(uint32 id, float x,float y,float z); + void MoveSeekAssistance(float x,float y,float z); + void MoveSeekAssistanceDistract(uint32 timer); void MoveTaxiFlight(uint32 path, uint32 pathnode); void MoveDistract(uint32 time); diff --git a/src/game/PointMovementGenerator.cpp b/src/game/PointMovementGenerator.cpp index 5e08c90f2..5069ce9cc 100644 --- a/src/game/PointMovementGenerator.cpp +++ b/src/game/PointMovementGenerator.cpp @@ -21,6 +21,7 @@ #include "Creature.h" #include "CreatureAI.h" #include "DestinationHolderImp.h" +#include "World.h" //----- Point Movement Generator template @@ -73,3 +74,11 @@ template void PointMovementGenerator::MovementInform(Player&); template void PointMovementGenerator::Initialize(Creature&); template bool PointMovementGenerator::Update(Creature&, const uint32 &diff); + +void AssistanceMovementGenerator::Finalize(Unit &unit) +{ + ((Creature*)&unit)->SetNoCallAssistance(false); + ((Creature*)&unit)->CallAssistance(); + if (unit.isAlive()) + unit.GetMotionMaster()->MoveSeekAssistanceDistract(sWorld.getConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY)); +} diff --git a/src/game/PointMovementGenerator.h b/src/game/PointMovementGenerator.h index 21b5e7172..4c82ba24f 100644 --- a/src/game/PointMovementGenerator.h +++ b/src/game/PointMovementGenerator.h @@ -48,4 +48,16 @@ class MANGOS_DLL_SPEC PointMovementGenerator TimeTracker i_nextMoveTime; DestinationHolder< Traveller > i_destinationHolder; }; + +class MANGOS_DLL_SPEC AssistanceMovementGenerator +: public PointMovementGenerator +{ + public: + AssistanceMovementGenerator(float _x, float _y, float _z) : + PointMovementGenerator(0, _x, _y, _z) {} + + MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_MOTION_TYPE; } + void Finalize(Unit &); +}; + #endif diff --git a/src/game/TargetedMovementGenerator.cpp b/src/game/TargetedMovementGenerator.cpp index c19108ece..6643f2a26 100644 --- a/src/game/TargetedMovementGenerator.cpp +++ b/src/game/TargetedMovementGenerator.cpp @@ -92,7 +92,10 @@ template void TargetedMovementGenerator::Initialize(T &owner) { - owner.RemoveUnitMovementFlag(MONSTER_MOVE_WALK); + if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->HasSearchedAssistance()) + owner.AddUnitMovementFlag(MONSTER_MOVE_WALK); + else + owner.RemoveUnitMovementFlag(MONSTER_MOVE_WALK); if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly()) owner.AddUnitMovementFlag(MONSTER_MOVE_FLY); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index e14313364..0c30a42f0 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4142,7 +4142,7 @@ DynamicObject * Unit::GetDynObject(uint32 spellId) GameObject* Unit::GetGameObject(uint32 spellId) const { - for (GameObjectList::const_iterator i = m_gameObj.begin(); i != m_gameObj.end();) + for (GameObjectList::const_iterator i = m_gameObj.begin(); i != m_gameObj.end(); ++i) if ((*i)->GetSpellId() == spellId) return *i; @@ -5214,19 +5214,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu if( procSpell->SpellFamilyFlags & 0x0000000000000004LL ) { triggered_spell_id = 40445; - chance = 25.f; + chance = 25.0f; } // Rejuvenation else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL ) { triggered_spell_id = 40446; - chance = 25.f; + chance = 25.0f; } // Mangle (cat/bear) else if( procSpell->SpellFamilyFlags & 0x0000044000000000LL ) { triggered_spell_id = 40452; - chance = 40.f; + chance = 40.0f; } else return false; @@ -5552,13 +5552,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu if( procSpell->SpellFamilyFlags & 0x00000000C0000000LL) { triggered_spell_id = 40471; - chance = 15.f; + chance = 15.0f; } // Judgement else if( procSpell->SpellFamilyFlags & 0x0000000000800000LL ) { triggered_spell_id = 40472; - chance = 50.f; + chance = 50.0f; } else return false; @@ -5718,17 +5718,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu if (procSpell->SpellFamilyFlags & 0x0000000000000001LL) { triggered_spell_id = 40465; // Lightning Bolt - chance = 15.f; + chance = 15.0f; } else if (procSpell->SpellFamilyFlags & 0x0000000000000080LL) { triggered_spell_id = 40465; // Lesser Healing Wave - chance = 10.f; + chance = 10.0f; } else if (procSpell->SpellFamilyFlags & 0x0000001000000000LL) { triggered_spell_id = 40466; // Stormstrike - chance = 50.f; + chance = 50.0f; } else return false; @@ -7252,7 +7252,10 @@ bool Unit::AttackStop(bool targetSwitch /*=false*/) // reset only at real combat stop if(!targetSwitch && GetTypeId()==TYPEID_UNIT ) + { ((Creature*)this)->SetNoCallAssistance(false); + ((Creature*)this)->SetNoSearchAssistance(false); + } SendAttackStop(victim); @@ -8866,10 +8869,6 @@ bool Unit::isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList, if(m_Visibility==VISIBILITY_RESPAWN) return false; - // always seen by owner - if(GetCharmerOrOwnerGUID()==u->GetGUID()) - return true; - // Grid dead/alive checks if( u->GetTypeId()==TYPEID_PLAYER) { @@ -8888,6 +8887,10 @@ bool Unit::isVisibleForOrDetect(Unit const* u, bool detect, bool inVisibleList, return false; } + // always seen by owner + if(GetCharmerOrOwnerGUID()==u->GetGUID()) + return true; + // different visible distance checks if(u->isInFlight()) // what see player in flight { @@ -10872,7 +10875,7 @@ void Unit::StopMoving() SendMessageToSet(&data,false); } -void Unit::SetFeared(bool apply, uint64 casterGUID, uint32 spellID) +void Unit::SetFeared(bool apply, uint64 casterGUID, uint32 spellID, uint32 time) { if( apply ) { @@ -10886,7 +10889,7 @@ void Unit::SetFeared(bool apply, uint64 casterGUID, uint32 spellID) Unit* caster = ObjectAccessor::GetUnit(*this,casterGUID); - GetMotionMaster()->MoveFleeing(caster); // caster==NULL processed in MoveFleeing + GetMotionMaster()->MoveFleeing(caster, time); // caster==NULL processed in MoveFleeing } else { @@ -11198,7 +11201,7 @@ uint32 Unit::GetCastingTimeForBonus( SpellEntry const *spellProto, DamageEffectT if (OriginalCastTime > 7000) OriginalCastTime = 7000; if (OriginalCastTime < 1500) OriginalCastTime = 1500; // Portion to Over Time - float PtOT = (overTime / 15000.f) / ((overTime / 15000.f) + (OriginalCastTime / 3500.f)); + float PtOT = (overTime / 15000.0f) / ((overTime / 15000.0f) + (OriginalCastTime / 3500.0f)); if ( damagetype == DOT ) CastingTime = uint32(CastingTime * PtOT); diff --git a/src/game/Unit.h b/src/game/Unit.h index f221783cd..adb9f7d5d 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1443,7 +1443,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject uint32 GetUnitMovementFlags() const { return m_unit_movement_flags; } void SetUnitMovementFlags(uint32 f) { m_unit_movement_flags = f; } - void SetFeared(bool apply, uint64 casterGUID = 0, uint32 spellID = 0); + void SetFeared(bool apply, uint64 casterGUID = 0, uint32 spellID = 0, uint32 time = 0); void SetConfused(bool apply, uint64 casterGUID = 0, uint32 spellID = 0); void AddComboPointHolder(uint32 lowguid) { m_ComboPointHolders.insert(lowguid); } diff --git a/src/game/World.cpp b/src/game/World.cpp index 324cc3671..f4ded72b6 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -879,8 +879,10 @@ void World::LoadConfigSettings(bool reload) m_configs[CONFIG_EVENT_ANNOUNCE] = sConfig.GetIntDefault("Event.Announce",0); + m_configs[CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS] = sConfig.GetIntDefault("CreatureFamilyFleeAssistanceRadius",30); m_configs[CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS] = sConfig.GetIntDefault("CreatureFamilyAssistanceRadius",10); m_configs[CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY] = sConfig.GetIntDefault("CreatureFamilyAssistanceDelay",1500); + m_configs[CONFIG_CREATURE_FAMILY_FLEE_DELAY] = sConfig.GetIntDefault("CreatureFamilyFleeDelay",7000); m_configs[CONFIG_WORLD_BOSS_LEVEL_DIFF] = sConfig.GetIntDefault("WorldBossLevelDiff",3); diff --git a/src/game/World.h b/src/game/World.h index 048973a01..19106df19 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -162,8 +162,10 @@ enum WorldConfigs CONFIG_CHATFLOOD_MESSAGE_DELAY, CONFIG_CHATFLOOD_MUTE_TIME, CONFIG_EVENT_ANNOUNCE, + CONFIG_CREATURE_FAMILY_FLEE_ASSISTANCE_RADIUS, CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS, CONFIG_CREATURE_FAMILY_ASSISTANCE_DELAY, + CONFIG_CREATURE_FAMILY_FLEE_DELAY, CONFIG_WORLD_BOSS_LEVEL_DIFF, CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF, CONFIG_QUEST_HIGH_LEVEL_HIDE_DIFF, diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 2405a3e47..7e94f4788 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -678,8 +678,13 @@ TalentsInspecting = 1 # 1.5 - 150% # 0 - off (0%) # +# CreatureFamilyFleeAssistanceRadius +# Radius which creature will use to seek for a near creature for assistance. Creature will flee to this creature. +# Default: 30 +# 0 - off +# # CreatureFamilyAssistanceRadius -# Creature family assistance radius +# Radius which creature will use to call assistance without moving # Default: 10 # 0 - off # @@ -687,6 +692,10 @@ TalentsInspecting = 1 # Reaction time for creature assistance call # Default: 1500 (1.5s) # +# CreatureFamilyFleeDelay +# Time during which creature can flee when no assistant found +# Default: 7000 (7s) +# # WorldBossLevelDiff # Difference for boss dynamic level with target # Default: 3 @@ -743,8 +752,10 @@ TalentsInspecting = 1 ThreatRadius = 100 Rate.Creature.Aggro = 1 +CreatureFamilyFleeAssistanceRadius = 30 CreatureFamilyAssistanceRadius = 10 CreatureFamilyAssistanceDelay = 1500 +CreatureFamilyFleeDelay = 7000 WorldBossLevelDiff = 3 Corpse.Decay.NORMAL = 60 Corpse.Decay.RARE = 300 diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0f17c3c58..3f8609005 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7856" + #define REVISION_NR "7866" #endif // __REVISION_NR_H__ diff --git a/src/shared/vmap/TileAssembler.cpp b/src/shared/vmap/TileAssembler.cpp index acd1e8c97..7c4856251 100644 --- a/src/shared/vmap/TileAssembler.cpp +++ b/src/shared/vmap/TileAssembler.cpp @@ -377,9 +377,13 @@ namespace VMAP int endgroup = INT_MAX; #endif + // temporary use defines to simplify read/check code (close file and return at fail) + #define READ_OR_RETURN(V,S) if(fread((V), (S), 1, rf) != 1) { fclose(rf); return(false); } + #define CMP_OR_RETURN(V,S) if(strcmp((V),(S)) != 0) { fclose(rf); return(false); } + if(rf) { - if(fread(&ident, 8, 1, rf) != 1) { fclose(rf); return(false); } + READ_OR_RETURN(&ident, 8); if(strcmp(ident, "VMAP001") == 0) { // OK, do nothing @@ -388,7 +392,7 @@ namespace VMAP { // we have to read one int. This is needed during the export and we have to skip it here int tempNVectors; - if(fread(&tempNVectors, sizeof(int), 1, rf) != 1) { fclose(rf); return(false); } + READ_OR_RETURN(&tempNVectors, sizeof(int)); } else @@ -402,7 +406,7 @@ namespace VMAP blockId[4] = 0; int blocksize; - if(fread(&groups, sizeof(G3D::uint32), 1, rf) != 1) { fclose(rf); return(false); } + READ_OR_RETURN(&groups, sizeof(G3D::uint32)); for(int g=0;g<(int)groups;g++) { @@ -412,61 +416,76 @@ namespace VMAP AABSPTree *gtree = new AABSPTree(); + // add free gtree at fail + #undef READ_OR_RETURN + #undef CMP_OR_RETURN + #define READ_OR_RETURN(V,S) if(fread((V), (S), 1, rf) != 1) { fclose(rf); delete gtree; return(false); } + #define CMP_OR_RETURN(V,S) if(strcmp((V),(S)) != 0) { fclose(rf); delete gtree; return(false); } + G3D::uint32 flags; - if(fread(&flags, sizeof(G3D::uint32), 1, rf) != 1) { fclose(rf); return(false); } + READ_OR_RETURN(&flags, sizeof(G3D::uint32)); G3D::uint32 branches; - if(fread(&blockId, 4, 1, rf) != 1) { fclose(rf); return(false); } - if(strcmp(blockId, "GRP ") != 0) { fclose(rf); return(false); } - if(fread(&blocksize, sizeof(int), 1, rf) != 1) { fclose(rf); return(false); } - if(fread(&branches, sizeof(G3D::uint32), 1, rf) != 1) { fclose(rf); return(false); } + READ_OR_RETURN(&blockId, 4); + CMP_OR_RETURN(blockId, "GRP "); + READ_OR_RETURN(&blocksize, sizeof(int)); + READ_OR_RETURN(&branches, sizeof(G3D::uint32)); for(int b=0;b<(int)branches; b++) { G3D::uint32 indexes; // indexes for each branch (not used jet) - if(fread(&indexes, sizeof(G3D::uint32), 1, rf) != 1) { fclose(rf); return(false); } + READ_OR_RETURN(&indexes, sizeof(G3D::uint32)); } // ---- indexes - if(fread(&blockId, 4, 1, rf) != 1) { fclose(rf); return(false); } - if(strcmp(blockId, "INDX") != 0) { fclose(rf); return(false); } - if(fread(&blocksize, sizeof(int), 1, rf) != 1) { fclose(rf); return(false); } + READ_OR_RETURN(&blockId, 4); + CMP_OR_RETURN(blockId, "INDX"); + READ_OR_RETURN(&blocksize, sizeof(int)); unsigned int nindexes; - if(fread(&nindexes, sizeof(G3D::uint32), 1, rf) != 1) { fclose(rf); return(false); } + READ_OR_RETURN(&nindexes, sizeof(G3D::uint32)); if(nindexes >0) { unsigned short *indexarray = new unsigned short[nindexes*sizeof(unsigned short)]; - if(fread(indexarray, sizeof(unsigned short), nindexes, rf) != nindexes) { fclose(rf); return(false); } + READ_OR_RETURN(indexarray, sizeof(unsigned short)); for(int i=0;i<(int)nindexes; i++) { unsigned short val = indexarray[i]; tempIndexArray.append(val); } - delete indexarray; + delete[] indexarray; } // ---- vectors - if(fread(&blockId, 4, 1, rf) != 1) {fclose(rf); return(false); } - if(strcmp(blockId, "VERT") != 0) { fclose(rf); return(false); } - if(fread(&blocksize, sizeof(int), 1, rf) != 1) { fclose(rf); return(false); } + READ_OR_RETURN(&blockId, 4); + CMP_OR_RETURN(blockId, "VERT"); + READ_OR_RETURN(&blocksize, sizeof(int)); unsigned int nvectors; - if(fread(&nvectors, sizeof(int), 1, rf) != 1) { fclose(rf); return(false); } + READ_OR_RETURN(&nvectors, sizeof(int)); + float *vectorarray = 0; + + // add vectorarray free + #undef READ_OR_RETURN + #undef CMP_OR_RETURN + #define READ_OR_RETURN(V,S) if(fread((V), (S), 1, rf) != 1) { fclose(rf); delete gtree; delete[] vectorarray; return(false); } + #define CMP_OR_RETURN(V,S) if(strcmp((V),(S)) != 0) { fclose(rf); delete gtree; delete[] vectorarray; return(false); } + if(nvectors >0) { vectorarray = new float[nvectors*sizeof(float)*3]; - if(fread(vectorarray, sizeof(float)*3, nvectors, rf) != nvectors) { fclose(rf); return(false); } + READ_OR_RETURN(vectorarray, sizeof(float)*3); } // ----- liquit if(flags & 1) { // we have liquit -> not handled yet ... skip - if(fread(&blockId, 4, 1, rf) != 1) { fclose(rf); return(false); } - if(strcmp(blockId, "LIQU") != 0) { fclose(rf); return(false); } - if(fread(&blocksize, sizeof(int), 1, rf) != 1) { fclose(rf); return(false); } - fseek(rf, blocksize, SEEK_CUR); + READ_OR_RETURN(&blockId, 4); + CMP_OR_RETURN(blockId, "LIQU"); + READ_OR_RETURN(&blocksize, sizeof(int)); + fseek(rf, blocksize, SEEK_CUR); } + for(unsigned int i=0, indexNo=0; indexNo - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC71/framework.vcproj b/win/VC71/framework.vcproj deleted file mode 100644 index 519c8f481..000000000 --- a/win/VC71/framework.vcproj +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC71/g3dlite.vcproj b/win/VC71/g3dlite.vcproj deleted file mode 100644 index c10b61a32..000000000 --- a/win/VC71/g3dlite.vcproj +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC71/game.vcproj b/win/VC71/game.vcproj deleted file mode 100644 index 3602d6f26..000000000 --- a/win/VC71/game.vcproj +++ /dev/null @@ -1,941 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC71/genrevision.vcproj b/win/VC71/genrevision.vcproj deleted file mode 100644 index 16a64d4a7..000000000 --- a/win/VC71/genrevision.vcproj +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC71/mangosd.vcproj b/win/VC71/mangosd.vcproj deleted file mode 100644 index ff7a46f5d..000000000 --- a/win/VC71/mangosd.vcproj +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC71/realmd.vcproj b/win/VC71/realmd.vcproj deleted file mode 100644 index 5c2151b69..000000000 --- a/win/VC71/realmd.vcproj +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC71/script.vcproj b/win/VC71/script.vcproj deleted file mode 100644 index d8ca035aa..000000000 --- a/win/VC71/script.vcproj +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC71/shared.vcproj b/win/VC71/shared.vcproj deleted file mode 100644 index 92d995690..000000000 --- a/win/VC71/shared.vcproj +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC71/sockets.vcproj b/win/VC71/sockets.vcproj deleted file mode 100644 index 16e52e283..000000000 --- a/win/VC71/sockets.vcproj +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/VC71/zlib.vcproj b/win/VC71/zlib.vcproj deleted file mode 100644 index 1f9b3a6af..000000000 --- a/win/VC71/zlib.vcproj +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win/mangosdVC71.sln b/win/mangosdVC71.sln deleted file mode 100644 index 45b423143..000000000 --- a/win/mangosdVC71.sln +++ /dev/null @@ -1,128 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 8.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "game", "VC71\game.vcproj", "{1DC6C4DA-A028-41F3-877D-D5400C594F88}" - ProjectSection(ProjectDependencies) = postProject - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} = {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shared", "VC71\shared.vcproj", "{90297C34-F231-4DF4-848E-A74BCC0E40ED}" - ProjectSection(ProjectDependencies) = postProject - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} = {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} - {803F488E-4C5A-4866-8D5C-1E6C03C007C2} = {803F488E-4C5A-4866-8D5C-1E6C03C007C2} - {7C74F49E-FECA-1BAD-6757-8A6348EA12C8} = {7C74F49E-FECA-1BAD-6757-8A6348EA12C8} - {DE0380F9-C910-4E99-A841-93550D0E61D7} = {DE0380F9-C910-4E99-A841-93550D0E61D7} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mangosd", "VC71\mangosd.vcproj", "{A3A04E47-43A2-4C08-90B3-029CEF558594}" - ProjectSection(ProjectDependencies) = postProject - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} = {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} = {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2} - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} = {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} - {1DC6C4DA-A028-41F3-877D-D5400C594F88} = {1DC6C4DA-A028-41F3-877D-D5400C594F88} - {262199E8-EEDF-4700-A1D1-E9CC901CF480} = {262199E8-EEDF-4700-A1D1-E9CC901CF480} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "VC71\zlib.vcproj", "{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "framework", "VC71\framework.vcproj", "{BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "realmd", "VC71\realmd.vcproj", "{563E9905-3657-460C-AE63-0AC39D162E23}" - ProjectSection(ProjectDependencies) = postProject - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} = {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E} - {90297C34-F231-4DF4-848E-A74BCC0E40ED} = {90297C34-F231-4DF4-848E-A74BCC0E40ED} - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} = {04BAF755-0D67-46F8-B1C6-77AE5368F3CB} - {1DC6C4DA-A028-41F3-877D-D5400C594F88} = {1DC6C4DA-A028-41F3-877D-D5400C594F88} - {262199E8-EEDF-4700-A1D1-E9CC901CF480} = {262199E8-EEDF-4700-A1D1-E9CC901CF480} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "script", "VC71\script.vcproj", "{4205C8A9-79B7-4354-8064-F05FB9CA0C96}" - ProjectSection(ProjectDependencies) = postProject - {A3A04E47-43A2-4C08-90B3-029CEF558594} = {A3A04E47-43A2-4C08-90B3-029CEF558594} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "g3dlite", "VC71\g3dlite.vcproj", "{DE0380F9-C910-4E99-A841-93550D0E61D7}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sockets", "VC71\sockets.vcproj", "{04BAF755-0D67-46F8-B1C6-77AE5368F3CB}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "genrevision", "VC71\genrevision.vcproj", "{803F488E-4C5A-4866-8D5C-1E6C03C007C2}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ACE_Wrappers", "VC71\ACE_vc71.vcproj", "{7C74F49E-FECA-1BAD-6757-8A6348EA12C8}" - ProjectSection(ProjectDependencies) = postProject - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfiguration) = preSolution - Debug = Debug - Release = Release - EndGlobalSection - GlobalSection(ProjectDependencies) = postSolution - EndGlobalSection - GlobalSection(ProjectConfiguration) = postSolution - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug.ActiveCfg = Debug|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Debug.Build.0 = Debug|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release.ActiveCfg = Release|Win32 - {1DC6C4DA-A028-41F3-877D-D5400C594F88}.Release.Build.0 = Release|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug.ActiveCfg = Debug|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Debug.Build.0 = Debug|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release.ActiveCfg = Release|Win32 - {90297C34-F231-4DF4-848E-A74BCC0E40ED}.Release.Build.0 = Release|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug.ActiveCfg = Debug|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Debug.Build.0 = Debug|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release.ActiveCfg = Release|Win32 - {A3A04E47-43A2-4C08-90B3-029CEF558594}.Release.Build.0 = Release|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug.ActiveCfg = Debug|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Debug.Build.0 = Debug|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release.ActiveCfg = Release|Win32 - {262199E8-EEDF-4700-A1D1-E9CC901CF480}.Release.Build.0 = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug.ActiveCfg = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Debug.Build.0 = Debug|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release.ActiveCfg = Release|Win32 - {8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}.Release.Build.0 = Release|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug.ActiveCfg = Debug|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Debug.Build.0 = Debug|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release.ActiveCfg = Release|Win32 - {BF6F5D0E-33A5-4E23-9E7D-DD481B7B5B9E}.Release.Build.0 = Release|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug.ActiveCfg = Debug|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Debug.Build.0 = Debug|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release.ActiveCfg = Release|Win32 - {563E9905-3657-460C-AE63-0AC39D162E23}.Release.Build.0 = Release|Win32 - {4205C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug.ActiveCfg = Debug|Win32 - {4205C8A9-79B7-4354-8064-F05FB9CA0C96}.Debug.Build.0 = Debug|Win32 - {4205C8A9-79B7-4354-8064-F05FB9CA0C96}.Release.ActiveCfg = Release|Win32 - {4205C8A9-79B7-4354-8064-F05FB9CA0C96}.Release.Build.0 = Release|Win32 - {DE0380F9-C910-4E99-A841-93550D0E61D7}.Debug.ActiveCfg = Debug|Win32 - {DE0380F9-C910-4E99-A841-93550D0E61D7}.Debug.Build.0 = Debug|Win32 - {DE0380F9-C910-4E99-A841-93550D0E61D7}.Release.ActiveCfg = Release|Win32 - {DE0380F9-C910-4E99-A841-93550D0E61D7}.Release.Build.0 = Release|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug.ActiveCfg = Debug|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Debug.Build.0 = Debug|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release.ActiveCfg = Release|Win32 - {04BAF755-0D67-46F8-B1C6-77AE5368F3CB}.Release.Build.0 = Release|Win32 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug.ActiveCfg = Debug|Win32 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Debug.Build.0 = Debug|Win32 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Release.ActiveCfg = Release|Win32 - {803F488E-4C5A-4866-8D5C-1E6C03C007C2}.Release.Build.0 = Release|Win32 - {7C74F49E-FECA-1BAD-6757-8A6348EA12C8}.Debug.ActiveCfg = Debug|Win32 - {7C74F49E-FECA-1BAD-6757-8A6348EA12C8}.Debug.Build.0 = Debug|Win32 - {7C74F49E-FECA-1BAD-6757-8A6348EA12C8}.Release.ActiveCfg = Release|Win32 - {7C74F49E-FECA-1BAD-6757-8A6348EA12C8}.Release.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - EndGlobalSection - GlobalSection(ExtensibilityAddIns) = postSolution - EndGlobalSection - GlobalSection(DPCodeReviewSolutionGUID) = preSolution - DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000} - EndGlobalSection -EndGlobal