[svn] * Little fix in RandomMovementGenerator
* Updated to 6731 and 680 --HG-- branch : trunk rename : 6721-676 => 6731-680
This commit is contained in:
@@ -2338,6 +2338,7 @@ INSERT INTO `mangos_string` VALUES
|
|||||||
(328,'Characters at account %s (Id: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(328,'Characters at account %s (Id: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(329,' %s (GUID %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(329,' %s (GUID %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(330,'No players found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(330,'No players found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
|
(331,'Extended item cost %u not exist',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(400,'|cffff0000[System Message]:|rScripts reloaded',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(400,'|cffff0000[System Message]:|rScripts reloaded',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(401,'You change security level of %s to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(401,'You change security level of %s to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
(402,'%s changed your security level to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
(402,'%s changed your security level to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||||
@@ -10485,6 +10486,7 @@ UNLOCK TABLES;
|
|||||||
DROP TABLE IF EXISTS `quest_template`;
|
DROP TABLE IF EXISTS `quest_template`;
|
||||||
CREATE TABLE `quest_template` (
|
CREATE TABLE `quest_template` (
|
||||||
`entry` mediumint(8) unsigned NOT NULL default '0',
|
`entry` mediumint(8) unsigned NOT NULL default '0',
|
||||||
|
`Method` tinyint(3) unsigned NOT NULL default '2',
|
||||||
`ZoneOrSort` smallint(6) NOT NULL default '0',
|
`ZoneOrSort` smallint(6) NOT NULL default '0',
|
||||||
`SkillOrClass` smallint(6) NOT NULL default '0',
|
`SkillOrClass` smallint(6) NOT NULL default '0',
|
||||||
`MinLevel` tinyint(3) unsigned NOT NULL default '0',
|
`MinLevel` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
ALTER TABLE `quest_template` ADD COLUMN `Method` tinyint(3) unsigned NOT NULL default '2' AFTER `entry`;
|
||||||
|
DELETE FROM mangos_string WHERE entry IN (331);
|
||||||
|
INSERT INTO mangos_string VALUES
|
||||||
|
(331,'Extended item cost %u not exist',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||||
@@ -679,6 +679,7 @@ Another example: the number "5" (101 in Binary, selecting first and third option
|
|||||||
2 4 CAST_FORCE_CAST Forces spell to cast even if the target is possibly out of range or the creature is possibly out of mana
|
2 4 CAST_FORCE_CAST Forces spell to cast even if the target is possibly out of range or the creature is possibly out of mana
|
||||||
3 8 CAST_NO_MELEE_IF_OOM Prevents creature from entering melee if out of mana or out of range
|
3 8 CAST_NO_MELEE_IF_OOM Prevents creature from entering melee if out of mana or out of range
|
||||||
4 16 CAST_FORCE_TARGET_SELF Forces the target to cast this spell on itself
|
4 16 CAST_FORCE_TARGET_SELF Forces the target to cast this spell on itself
|
||||||
|
5 32 CAST_AURA_NOT_PRESENT Only casts the spell on the target if the target does not have the aura from that spell on itself already.
|
||||||
|
|
||||||
NOTE: You can add the numbers in the decimal column to combine flags.
|
NOTE: You can add the numbers in the decimal column to combine flags.
|
||||||
For example if you wanted to use CAST_NO_MELEE_IF_OOM(8) and CAST_TRIGGERED(2) you would simply use 10 in the cast flags field (8 + 2 = 10).
|
For example if you wanted to use CAST_NO_MELEE_IF_OOM(8) and CAST_TRIGGERED(2) you would simply use 10 in the cast flags field (8 + 2 = 10).
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ void ScriptedAI::MoveInLineOfSight(Unit *who)
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,8 +54,8 @@ void ScriptedAI::AttackStart(Unit* who)
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -582,8 +582,8 @@ void Scripted_NoMovementAI::MoveInLineOfSight(Unit *who)
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -601,8 +601,8 @@ void Scripted_NoMovementAI::AttackStart(Unit* who)
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
case EVENT_T_SPAWNED:
|
case EVENT_T_SPAWNED:
|
||||||
ProcessEvent(*i);
|
ProcessEvent(*i);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -612,12 +610,18 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
caster = target;
|
caster = target;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Interrupt any previous spell
|
//Allowed to cast only if not casting (unless we interrupt ourself) or if spell is triggered
|
||||||
if (caster->IsNonMeleeSpellCasted(false) && param3 & CAST_INTURRUPT_PREVIOUS)
|
bool canCast = !(caster->IsNonMeleeSpellCasted(false) && (param3 & CAST_TRIGGERED | CAST_INTURRUPT_PREVIOUS));
|
||||||
caster->InterruptNonMeleeSpells(false);
|
|
||||||
|
|
||||||
//Cast only if not casting or if spell is triggered
|
// If cast flag CAST_AURA_NOT_PRESENT is active, check if target already has aura on them
|
||||||
if (param3 & CAST_TRIGGERED || !caster->IsNonMeleeSpellCasted(false))
|
if(param3 & CAST_AURA_NOT_PRESENT)
|
||||||
|
{
|
||||||
|
for(uint8 i = 0; i < 3; ++i)
|
||||||
|
if(target->HasAura(param1, i))
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (canCast)
|
||||||
{
|
{
|
||||||
const SpellEntry* tSpell = GetSpellStore()->LookupEntry(param1);
|
const SpellEntry* tSpell = GetSpellStore()->LookupEntry(param1);
|
||||||
|
|
||||||
@@ -638,7 +642,14 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle);
|
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle);
|
||||||
}
|
}
|
||||||
|
|
||||||
}else caster->CastSpell(target, param1, (param3 & CAST_TRIGGERED));
|
}else
|
||||||
|
{
|
||||||
|
//Interrupt any previous spell
|
||||||
|
if (caster->IsNonMeleeSpellCasted(false) && param3 & CAST_INTURRUPT_PREVIOUS)
|
||||||
|
caster->InterruptNonMeleeSpells(false);
|
||||||
|
|
||||||
|
caster->CastSpell(target, param1, (param3 & CAST_TRIGGERED));
|
||||||
|
}
|
||||||
|
|
||||||
}else if (EAI_ErrorLevel > 0)
|
}else if (EAI_ErrorLevel > 0)
|
||||||
error_db_log("SD2: EventAI event %d creature %d attempt to cast spell that doesn't exist %d", EventId, m_creature->GetEntry(), param1);
|
error_db_log("SD2: EventAI event %d creature %d attempt to cast spell that doesn't exist %d", EventId, m_creature->GetEntry(), param1);
|
||||||
@@ -996,11 +1007,11 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
error_db_log("SD2: Creature %u using Event %u (Type = %u) has InitialMax < InitialMin. Event disabled.", m_creature->GetEntry(), (*i).Event.event_id, (*i).Event.event_type);
|
error_db_log("SD2: Creature %u using Event %u (Type = %u) has InitialMax < InitialMin. Event disabled.", m_creature->GetEntry(), (*i).Event.event_id, (*i).Event.event_type);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
//default:
|
||||||
//TODO: enable below code line / verify this is correct to enable events previously disabled (ex. aggro yell), instead of enable this in void Aggro()
|
//TODO: enable below code line / verify this is correct to enable events previously disabled (ex. aggro yell), instead of enable this in void Aggro()
|
||||||
//(*i).Enabled = true;
|
//(*i).Enabled = true;
|
||||||
//(*i).Time = 0;
|
//(*i).Time = 0;
|
||||||
break;
|
//break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1029,8 +1040,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
case EVENT_T_EVADE:
|
case EVENT_T_EVADE:
|
||||||
ProcessEvent(*i);
|
ProcessEvent(*i);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1050,8 +1059,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
case EVENT_T_DEATH:
|
case EVENT_T_DEATH:
|
||||||
ProcessEvent(*i, killer);
|
ProcessEvent(*i, killer);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1069,8 +1076,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
case EVENT_T_KILL:
|
case EVENT_T_KILL:
|
||||||
ProcessEvent(*i, victim);
|
ProcessEvent(*i, victim);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1089,8 +1094,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
case EVENT_T_SUMMONED_UNIT:
|
case EVENT_T_SUMMONED_UNIT:
|
||||||
ProcessEvent(*i, pUnit);
|
ProcessEvent(*i, pUnit);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1145,8 +1148,8 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1193,8 +1196,8 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1215,8 +1218,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
|
|||||||
ProcessEvent(*i, pUnit);
|
ProcessEvent(*i, pUnit);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ enum CastFlags
|
|||||||
CAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range
|
CAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range
|
||||||
CAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range
|
CAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range
|
||||||
CAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself
|
CAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself
|
||||||
|
CAST_AURA_NOT_PRESENT = 0x20, //Only casts the spell if the target does not have an aura from the spell
|
||||||
};
|
};
|
||||||
|
|
||||||
enum EventFlags
|
enum EventFlags
|
||||||
|
|||||||
+1
-3
@@ -104,8 +104,6 @@ struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI
|
|||||||
DoCast(m_creature->getVictim(), SPELL_MOONFIRE);
|
DoCast(m_creature->getVictim(), SPELL_MOONFIRE);
|
||||||
Class_Timer = 10000;
|
Class_Timer = 10000;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}else Class_Timer -= diff;
|
}else Class_Timer -= diff;
|
||||||
|
|
||||||
@@ -204,8 +202,8 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -106,8 +106,8 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -115,8 +115,8 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -125,8 +125,8 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,8 +95,8 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ struct MANGOS_DLL_DECL npc_ragged_johnAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -117,8 +117,8 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,8 +138,8 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -108,8 +108,8 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f))
|
else if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f))
|
||||||
|
|||||||
+2
-2
@@ -200,8 +200,8 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI
|
|||||||
|
|
||||||
if( !InCombat )
|
if( !InCombat )
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -237,8 +237,8 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI
|
|||||||
|
|
||||||
if( !InCombat )
|
if( !InCombat )
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -582,13 +582,13 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI
|
|||||||
if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE) && !m_creature->IsNonMeleeSpellCasted(false))
|
if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE) && !m_creature->IsNonMeleeSpellCasted(false))
|
||||||
{
|
{
|
||||||
//Check for base attack
|
//Check for base attack
|
||||||
if( m_creature->isAttackReady())
|
if( m_creature->isAttackReady() && m_creature->getVictim() )
|
||||||
{
|
{
|
||||||
m_creature->AttackerStateUpdate(m_creature->getVictim());
|
m_creature->AttackerStateUpdate(m_creature->getVictim());
|
||||||
m_creature->resetAttackTimer();
|
m_creature->resetAttackTimer();
|
||||||
}
|
}
|
||||||
//Check for offhand attack
|
//Check for offhand attack
|
||||||
if( m_creature->isAttackReady(OFF_ATTACK))
|
if( m_creature->isAttackReady(OFF_ATTACK) && m_creature->getVictim() )
|
||||||
{
|
{
|
||||||
m_creature->AttackerStateUpdate(m_creature->getVictim(), OFF_ATTACK);
|
m_creature->AttackerStateUpdate(m_creature->getVictim(), OFF_ATTACK);
|
||||||
m_creature->resetAttackTimer(OFF_ATTACK);
|
m_creature->resetAttackTimer(OFF_ATTACK);
|
||||||
|
|||||||
@@ -163,9 +163,6 @@ class MANGOS_DLL_SPEC instance_molten_core : public ScriptedInstance
|
|||||||
case ID_FLAMEWAKERPRIEST:
|
case ID_FLAMEWAKERPRIEST:
|
||||||
FlamewakerPriest = creature->GetGUID();
|
FlamewakerPriest = creature->GetGUID();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -264,8 +264,6 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI
|
|||||||
}
|
}
|
||||||
++Phase;
|
++Phase;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} else Event_Timer -= diff;
|
} else Event_Timer -= diff;
|
||||||
|
|
||||||
|
|||||||
@@ -138,8 +138,8 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -153,8 +153,8 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -444,8 +444,6 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI
|
|||||||
case 7:
|
case 7:
|
||||||
pInstance->SetData(TYPE_WARDEN_5,IN_PROGRESS);
|
pInstance->SetData(TYPE_WARDEN_5,IN_PROGRESS);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
CanSpawn = true;
|
CanSpawn = true;
|
||||||
}
|
}
|
||||||
@@ -505,8 +503,6 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI
|
|||||||
DoYell(YELL_WELCOME,LANG_UNIVERSAL,NULL);
|
DoYell(YELL_WELCOME,LANG_UNIVERSAL,NULL);
|
||||||
DoPlaySoundToSet(m_creature,SOUND_WELCOME);
|
DoPlaySoundToSet(m_creature,SOUND_WELCOME);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
CanSpawn = false;
|
CanSpawn = false;
|
||||||
++Phase;
|
++Phase;
|
||||||
@@ -553,8 +549,6 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI
|
|||||||
DoPrepareForPhase();
|
DoPrepareForPhase();
|
||||||
EventProgress_Timer = 15000;
|
EventProgress_Timer = 15000;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else EventProgress_Timer -= diff;
|
} else EventProgress_Timer -= diff;
|
||||||
|
|||||||
@@ -130,8 +130,8 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -148,8 +148,8 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI
|
|||||||
|
|
||||||
if( !InCombat )
|
if( !InCombat )
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -236,8 +236,6 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI
|
|||||||
case 3:
|
case 3:
|
||||||
Intro = true;
|
Intro = true;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}else Intro_Timer -=diff;
|
}else Intro_Timer -=diff;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,8 +215,8 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -234,8 +234,8 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -863,14 +863,10 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
|||||||
DoYell(SAY_SUMMON_PHOENIX1, LANG_UNIVERSAL, NULL);
|
DoYell(SAY_SUMMON_PHOENIX1, LANG_UNIVERSAL, NULL);
|
||||||
DoPlaySoundToSet(m_creature, SOUND_SUMMON_PHOENIX1);
|
DoPlaySoundToSet(m_creature, SOUND_SUMMON_PHOENIX1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
DoYell(SAY_SUMMON_PHOENIX2, LANG_UNIVERSAL, NULL);
|
DoYell(SAY_SUMMON_PHOENIX2, LANG_UNIVERSAL, NULL);
|
||||||
DoPlaySoundToSet(m_creature, SOUND_SUMMON_PHOENIX2);
|
DoPlaySoundToSet(m_creature, SOUND_SUMMON_PHOENIX2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Phoenix_Timer = 60000;
|
Phoenix_Timer = 60000;
|
||||||
@@ -1252,8 +1248,8 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisorbase_a
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -665,8 +665,8 @@ struct MANGOS_DLL_DECL boss_veklorAI : public boss_twinemperorsAI
|
|||||||
|
|
||||||
if (!InCombat)
|
if (!InCombat)
|
||||||
{
|
{
|
||||||
Aggro(who);
|
|
||||||
InCombat = true;
|
InCombat = true;
|
||||||
|
Aggro(who);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,62 +34,6 @@
|
|||||||
|
|
||||||
bool ChatHandler::load_command_table = true;
|
bool ChatHandler::load_command_table = true;
|
||||||
|
|
||||||
LanguageDesc lang_description[LANGUAGES_COUNT] =
|
|
||||||
{
|
|
||||||
{ LANG_ADDON, 0, 0 },
|
|
||||||
{ LANG_UNIVERSAL, 0, 0 },
|
|
||||||
{ LANG_ORCISH, 669, SKILL_LANG_ORCISH },
|
|
||||||
{ LANG_DARNASSIAN, 671, SKILL_LANG_DARNASSIAN },
|
|
||||||
{ LANG_TAURAHE, 670, SKILL_LANG_TAURAHE },
|
|
||||||
{ LANG_DWARVISH, 672, SKILL_LANG_DWARVEN },
|
|
||||||
{ LANG_COMMON, 668, SKILL_LANG_COMMON },
|
|
||||||
{ LANG_DEMONIC, 815, SKILL_LANG_DEMON_TONGUE },
|
|
||||||
{ LANG_TITAN, 816, SKILL_LANG_TITAN },
|
|
||||||
{ LANG_THALASSIAN, 813, SKILL_LANG_THALASSIAN },
|
|
||||||
{ LANG_DRACONIC, 814, SKILL_LANG_DRACONIC },
|
|
||||||
{ LANG_KALIMAG, 817, SKILL_LANG_OLD_TONGUE },
|
|
||||||
{ LANG_GNOMISH, 7340, SKILL_LANG_GNOMISH },
|
|
||||||
{ LANG_TROLL, 7341, SKILL_LANG_TROLL },
|
|
||||||
{ LANG_GUTTERSPEAK, 17737, SKILL_LANG_GUTTERSPEAK },
|
|
||||||
{ LANG_DRAENEI, 29932, SKILL_LANG_DRAENEI },
|
|
||||||
{ LANG_ZOMBIE, 0, 0 },
|
|
||||||
{ LANG_GNOMISH_BINARY, 0, 0 },
|
|
||||||
{ LANG_GOBLIN_BINARY, 0, 0 }
|
|
||||||
};
|
|
||||||
|
|
||||||
LanguageDesc const* GetLanguageDescByID(uint32 lang)
|
|
||||||
{
|
|
||||||
for(int i = 0; i < LANGUAGES_COUNT; ++i)
|
|
||||||
{
|
|
||||||
if(uint32(lang_description[i].lang_id) == lang)
|
|
||||||
return &lang_description[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
LanguageDesc const* GetLanguageDescBySpell(uint32 spell_id)
|
|
||||||
{
|
|
||||||
for(int i = 0; i < LANGUAGES_COUNT; ++i)
|
|
||||||
{
|
|
||||||
if(lang_description[i].spell_id == spell_id)
|
|
||||||
return &lang_description[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
LanguageDesc const* GetLanguageDescBySkill(uint32 skill_id)
|
|
||||||
{
|
|
||||||
for(int i = 0; i < LANGUAGES_COUNT; ++i)
|
|
||||||
{
|
|
||||||
if(lang_description[i].skill_id == skill_id)
|
|
||||||
return &lang_description[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ChatCommand * ChatHandler::getCommandTable()
|
ChatCommand * ChatHandler::getCommandTable()
|
||||||
{
|
{
|
||||||
static ChatCommand serverCommandTable[] =
|
static ChatCommand serverCommandTable[] =
|
||||||
|
|||||||
@@ -28,19 +28,6 @@ class Player;
|
|||||||
class Unit;
|
class Unit;
|
||||||
struct GameTele;
|
struct GameTele;
|
||||||
|
|
||||||
struct LanguageDesc
|
|
||||||
{
|
|
||||||
Language lang_id;
|
|
||||||
uint32 spell_id;
|
|
||||||
uint32 skill_id;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern LanguageDesc lang_description[LANGUAGES_COUNT];
|
|
||||||
|
|
||||||
LanguageDesc const* GetLanguageDescByID(uint32 lang);
|
|
||||||
LanguageDesc const* GetLanguageDescBySpell(uint32 spell_id);
|
|
||||||
LanguageDesc const* GetLanguageDescBySkill(uint32 skill_id);
|
|
||||||
|
|
||||||
class ChatCommand
|
class ChatCommand
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
+124
-31
@@ -62,15 +62,36 @@ TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool VendorItemData::RemoveItem( uint32 item_id )
|
||||||
|
{
|
||||||
|
for(VendorItemList::iterator i = m_items.begin(); i != m_items.end(); ++i )
|
||||||
|
{
|
||||||
|
if((*i)->item==item_id)
|
||||||
|
{
|
||||||
|
m_items.erase(i);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
VendorItem const* VendorItemData::FindItem(uint32 item_id) const
|
||||||
|
{
|
||||||
|
for(VendorItemList::const_iterator i = m_items.begin(); i != m_items.end(); ++i )
|
||||||
|
if((*i)->item==item_id)
|
||||||
|
return *i;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
Creature::Creature() :
|
Creature::Creature() :
|
||||||
Unit(), i_AI(NULL),
|
Unit(), i_AI(NULL),
|
||||||
lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLeaderGUID(0),
|
lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLeaderGUID(0),
|
||||||
m_itemsLoaded(false), m_lootMoney(0), m_lootRecipient(0),
|
m_lootMoney(0), m_lootRecipient(0),
|
||||||
m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_respawnradius(0.0f),
|
m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_respawnradius(0.0f),
|
||||||
m_gossipOptionLoaded(false),m_emoteState(0), m_isPet(false), m_isTotem(false),
|
m_gossipOptionLoaded(false),m_emoteState(0), m_isPet(false), m_isTotem(false),
|
||||||
m_regenTimer(2000), m_defaultMovementType(IDLE_MOTION_TYPE), m_equipmentId(0),
|
m_regenTimer(2000), m_defaultMovementType(IDLE_MOTION_TYPE), m_equipmentId(0),
|
||||||
m_AlreadyCallAssistence(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false),
|
m_AlreadyCallAssistence(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false),
|
||||||
m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),m_creatureInfo(NULL)
|
m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),m_creatureInfo(NULL), m_DBTableGuid(0)
|
||||||
{
|
{
|
||||||
m_valuesCount = UNIT_END;
|
m_valuesCount = UNIT_END;
|
||||||
|
|
||||||
@@ -87,7 +108,7 @@ Creature::~Creature()
|
|||||||
{
|
{
|
||||||
CleanupsBeforeDelete();
|
CleanupsBeforeDelete();
|
||||||
|
|
||||||
m_vendor_items.clear();
|
m_vendorItemCounts.clear();
|
||||||
|
|
||||||
delete i_AI;
|
delete i_AI;
|
||||||
i_AI = NULL;
|
i_AI = NULL;
|
||||||
@@ -503,6 +524,7 @@ bool Creature::Create (uint32 guidlow, Map *map, uint32 Entry, uint32 team, cons
|
|||||||
m_corpseDelay = sWorld.getConfig(CONFIG_CORPSE_DECAY_NORMAL);
|
m_corpseDelay = sWorld.getConfig(CONFIG_CORPSE_DECAY_NORMAL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
LoadCreaturesAddon();
|
||||||
}
|
}
|
||||||
|
|
||||||
return bResult;
|
return bResult;
|
||||||
@@ -673,16 +695,16 @@ void Creature::prepareGossipMenu( Player *pPlayer,uint32 gossipid )
|
|||||||
cantalking=false;
|
cantalking=false;
|
||||||
break;
|
break;
|
||||||
case GOSSIP_OPTION_VENDOR:
|
case GOSSIP_OPTION_VENDOR:
|
||||||
// load vendor items if not yet
|
{
|
||||||
LoadGoods();
|
VendorItemData const* vItems = GetVendorItems();
|
||||||
|
if(!vItems || vItems->Empty())
|
||||||
if(!GetItemCount())
|
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_VENDOR but have empty trading item list.",
|
sLog.outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_VENDOR but have empty trading item list.",
|
||||||
GetGUIDLow(),GetEntry());
|
GetGUIDLow(),GetEntry());
|
||||||
cantalking=false;
|
cantalking=false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case GOSSIP_OPTION_TRAINER:
|
case GOSSIP_OPTION_TRAINER:
|
||||||
if(!isCanTrainingOf(pPlayer,false))
|
if(!isCanTrainingOf(pPlayer,false))
|
||||||
cantalking=false;
|
cantalking=false;
|
||||||
@@ -934,6 +956,9 @@ uint32 Creature::GetGossipTextId(uint32 action, uint32 zoneid)
|
|||||||
|
|
||||||
uint32 Creature::GetNpcTextId()
|
uint32 Creature::GetNpcTextId()
|
||||||
{
|
{
|
||||||
|
if (!m_DBTableGuid)
|
||||||
|
return DEFAULT_GOSSIP_MESSAGE;
|
||||||
|
|
||||||
if(uint32 pos = objmgr.GetNpcGossip(m_DBTableGuid))
|
if(uint32 pos = objmgr.GetNpcGossip(m_DBTableGuid))
|
||||||
return pos;
|
return pos;
|
||||||
|
|
||||||
@@ -1046,6 +1071,8 @@ void Creature::SaveToDB()
|
|||||||
void Creature::SaveToDB(uint32 mapid, uint8 spawnMask)
|
void Creature::SaveToDB(uint32 mapid, uint8 spawnMask)
|
||||||
{
|
{
|
||||||
// update in loaded data
|
// update in loaded data
|
||||||
|
if (!m_DBTableGuid)
|
||||||
|
m_DBTableGuid = GetGUIDLow();
|
||||||
CreatureData& data = objmgr.NewOrExistCreatureData(m_DBTableGuid);
|
CreatureData& data = objmgr.NewOrExistCreatureData(m_DBTableGuid);
|
||||||
|
|
||||||
uint32 displayId = GetNativeDisplayId();
|
uint32 displayId = GetNativeDisplayId();
|
||||||
@@ -1237,7 +1264,6 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 team, const
|
|||||||
|
|
||||||
Object::_Create(guidlow, Entry, HIGHGUID_UNIT);
|
Object::_Create(guidlow, Entry, HIGHGUID_UNIT);
|
||||||
|
|
||||||
m_DBTableGuid = guidlow;
|
|
||||||
if(!UpdateEntry(Entry, team, data))
|
if(!UpdateEntry(Entry, team, data))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -1263,7 +1289,7 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 stored_guid = guid;
|
m_DBTableGuid = guid;
|
||||||
if (map->GetInstanceId() != 0) guid = objmgr.GenerateLowGuid(HIGHGUID_UNIT);
|
if (map->GetInstanceId() != 0) guid = objmgr.GenerateLowGuid(HIGHGUID_UNIT);
|
||||||
|
|
||||||
uint16 team = 0;
|
uint16 team = 0;
|
||||||
@@ -1278,9 +1304,6 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_DBTableGuid = stored_guid;
|
|
||||||
LoadCreaturesAddon();
|
|
||||||
|
|
||||||
m_respawnradius = data->spawndist;
|
m_respawnradius = data->spawndist;
|
||||||
|
|
||||||
m_respawnDelay = data->spawntimesecs;
|
m_respawnDelay = data->spawntimesecs;
|
||||||
@@ -1346,24 +1369,6 @@ void Creature::LoadEquipment(uint32 equip_entry, bool force)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Creature::LoadGoods()
|
|
||||||
{
|
|
||||||
// already loaded;
|
|
||||||
if(m_itemsLoaded)
|
|
||||||
return;
|
|
||||||
|
|
||||||
m_vendor_items.clear();
|
|
||||||
|
|
||||||
VendorItemList const* vList = objmgr.GetNpcVendorItemList(GetEntry());
|
|
||||||
if(!vList)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (VendorItemList::const_iterator _item_iter = vList->begin(); _item_iter != vList->end(); ++_item_iter)
|
|
||||||
AddItem( (*_item_iter)->item, (*_item_iter)->maxcount, (*_item_iter)->incrtime, (*_item_iter)->ExtendedCost);
|
|
||||||
|
|
||||||
m_itemsLoaded = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Creature::hasQuest(uint32 quest_id) const
|
bool Creature::hasQuest(uint32 quest_id) const
|
||||||
{
|
{
|
||||||
QuestRelations const& qr = objmgr.mCreatureQuestRelations;
|
QuestRelations const& qr = objmgr.mCreatureQuestRelations;
|
||||||
@@ -1388,6 +1393,12 @@ bool Creature::hasInvolvedQuest(uint32 quest_id) const
|
|||||||
|
|
||||||
void Creature::DeleteFromDB()
|
void Creature::DeleteFromDB()
|
||||||
{
|
{
|
||||||
|
if (!m_DBTableGuid)
|
||||||
|
{
|
||||||
|
sLog.outDebug("Trying to delete not saved creature!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),0);
|
objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),0);
|
||||||
objmgr.DeleteCreatureData(m_DBTableGuid);
|
objmgr.DeleteCreatureData(m_DBTableGuid);
|
||||||
|
|
||||||
@@ -1494,6 +1505,7 @@ void Creature::Respawn()
|
|||||||
|
|
||||||
if(getDeathState()==DEAD)
|
if(getDeathState()==DEAD)
|
||||||
{
|
{
|
||||||
|
if (m_DBTableGuid)
|
||||||
objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),0);
|
objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),0);
|
||||||
m_respawnTime = time(NULL); // respawn at next tick
|
m_respawnTime = time(NULL); // respawn at next tick
|
||||||
}
|
}
|
||||||
@@ -1716,7 +1728,7 @@ void Creature::CallAssistence()
|
|||||||
|
|
||||||
void Creature::SaveRespawnTime()
|
void Creature::SaveRespawnTime()
|
||||||
{
|
{
|
||||||
if(isPet())
|
if(isPet() || !m_DBTableGuid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(m_respawnTime > time(NULL)) // dead (no corpse)
|
if(m_respawnTime > time(NULL)) // dead (no corpse)
|
||||||
@@ -1751,9 +1763,12 @@ bool Creature::IsOutOfThreatArea(Unit* pVictim) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
CreatureDataAddon const* Creature::GetCreatureAddon() const
|
CreatureDataAddon const* Creature::GetCreatureAddon() const
|
||||||
|
{
|
||||||
|
if (m_DBTableGuid)
|
||||||
{
|
{
|
||||||
if(CreatureDataAddon const* addon = ObjectMgr::GetCreatureAddon(m_DBTableGuid))
|
if(CreatureDataAddon const* addon = ObjectMgr::GetCreatureAddon(m_DBTableGuid))
|
||||||
return addon;
|
return addon;
|
||||||
|
}
|
||||||
|
|
||||||
// dependent from heroic mode entry
|
// dependent from heroic mode entry
|
||||||
return ObjectMgr::GetCreatureTemplateAddon(GetCreatureInfo()->Entry);
|
return ObjectMgr::GetCreatureTemplateAddon(GetCreatureInfo()->Entry);
|
||||||
@@ -1956,6 +1971,84 @@ char const* Creature::GetScriptName() const
|
|||||||
return ObjectMgr::GetCreatureTemplate(GetEntry())->ScriptName;
|
return ObjectMgr::GetCreatureTemplate(GetEntry())->ScriptName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VendorItemData const* Creature::GetVendorItems() const
|
||||||
|
{
|
||||||
|
return objmgr.GetNpcVendorItemList(GetEntry());
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 Creature::GetVendorItemCurrentCount(VendorItem const* vItem)
|
||||||
|
{
|
||||||
|
if(!vItem->maxcount)
|
||||||
|
return vItem->maxcount;
|
||||||
|
|
||||||
|
VendorItemCounts::iterator itr = m_vendorItemCounts.begin();
|
||||||
|
for(; itr != m_vendorItemCounts.end(); ++itr)
|
||||||
|
if(itr->itemId==vItem->item)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if(itr == m_vendorItemCounts.end())
|
||||||
|
return vItem->maxcount;
|
||||||
|
|
||||||
|
VendorItemCount* vCount = &*itr;
|
||||||
|
|
||||||
|
time_t ptime = time(NULL);
|
||||||
|
|
||||||
|
if( vCount->lastIncrementTime + vItem->incrtime <= ptime )
|
||||||
|
{
|
||||||
|
ItemPrototype const* pProto = objmgr.GetItemPrototype(vItem->item);
|
||||||
|
|
||||||
|
uint32 diff = uint32((ptime - vCount->lastIncrementTime)/vItem->incrtime);
|
||||||
|
if((vCount->count + diff * pProto->BuyCount) >= vItem->maxcount )
|
||||||
|
{
|
||||||
|
m_vendorItemCounts.erase(itr);
|
||||||
|
return vItem->maxcount;
|
||||||
|
}
|
||||||
|
|
||||||
|
vCount->count += diff * pProto->BuyCount;
|
||||||
|
vCount->lastIncrementTime = ptime;
|
||||||
|
}
|
||||||
|
|
||||||
|
return vCount->count;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 Creature::UpdateVendorItemCurrentCount(VendorItem const* vItem, uint32 used_count)
|
||||||
|
{
|
||||||
|
if(!vItem->maxcount)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
VendorItemCounts::iterator itr = m_vendorItemCounts.begin();
|
||||||
|
for(; itr != m_vendorItemCounts.end(); ++itr)
|
||||||
|
if(itr->itemId==vItem->item)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if(itr == m_vendorItemCounts.end())
|
||||||
|
{
|
||||||
|
uint32 new_count = vItem->maxcount > used_count ? vItem->maxcount-used_count : 0;
|
||||||
|
m_vendorItemCounts.push_back(VendorItemCount(vItem->item,new_count));
|
||||||
|
return new_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
VendorItemCount* vCount = &*itr;
|
||||||
|
|
||||||
|
time_t ptime = time(NULL);
|
||||||
|
|
||||||
|
if( vCount->lastIncrementTime + vItem->incrtime <= ptime )
|
||||||
|
{
|
||||||
|
ItemPrototype const* pProto = objmgr.GetItemPrototype(vItem->item);
|
||||||
|
|
||||||
|
uint32 diff = uint32((ptime - vCount->lastIncrementTime)/vItem->incrtime);
|
||||||
|
if((vCount->count + diff * pProto->BuyCount) < vItem->maxcount )
|
||||||
|
vCount->count += diff * pProto->BuyCount;
|
||||||
|
else
|
||||||
|
vCount->count = vItem->maxcount;
|
||||||
|
}
|
||||||
|
|
||||||
|
vCount->count = vCount->count > used_count ? vCount->count-used_count : 0;
|
||||||
|
vCount->lastIncrementTime = ptime;
|
||||||
|
return vCount->count;
|
||||||
|
}
|
||||||
|
|
||||||
TrainerSpellData const* Creature::GetTrainerSpells() const
|
TrainerSpellData const* Creature::GetTrainerSpells() const
|
||||||
{
|
{
|
||||||
return objmgr.GetNpcTrainerSpells(GetEntry());
|
return objmgr.GetNpcTrainerSpells(GetEntry());
|
||||||
|
|||||||
+55
-52
@@ -112,19 +112,6 @@ struct GossipOption
|
|||||||
std::string Option;
|
std::string Option;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CreatureItem
|
|
||||||
{
|
|
||||||
CreatureItem(uint32 _item, uint32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost)
|
|
||||||
: id(_item), count(_maxcount), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost), lastincr((uint32)time(NULL)) {}
|
|
||||||
|
|
||||||
uint32 id;
|
|
||||||
uint32 count;
|
|
||||||
uint32 maxcount;
|
|
||||||
uint32 incrtime;
|
|
||||||
uint32 lastincr;
|
|
||||||
uint32 ExtendedCost;
|
|
||||||
};
|
|
||||||
|
|
||||||
enum CreatureFlagsExtra
|
enum CreatureFlagsExtra
|
||||||
{
|
{
|
||||||
CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group
|
CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group
|
||||||
@@ -291,6 +278,56 @@ enum InhabitTypeValues
|
|||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Vendors
|
||||||
|
struct VendorItem
|
||||||
|
{
|
||||||
|
VendorItem(uint32 _item, uint32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost)
|
||||||
|
: item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost) {}
|
||||||
|
|
||||||
|
uint32 item;
|
||||||
|
uint32 maxcount; // 0 for infinity item amount
|
||||||
|
uint32 incrtime; // time for restore items amount if maxcount != 0
|
||||||
|
uint32 ExtendedCost;
|
||||||
|
};
|
||||||
|
typedef std::vector<VendorItem*> VendorItemList;
|
||||||
|
|
||||||
|
struct VendorItemData
|
||||||
|
{
|
||||||
|
VendorItemList m_items;
|
||||||
|
|
||||||
|
VendorItem* GetItem(uint32 slot) const
|
||||||
|
{
|
||||||
|
if(slot>=m_items.size()) return NULL;
|
||||||
|
return m_items[slot];
|
||||||
|
}
|
||||||
|
bool Empty() const { return m_items.empty(); }
|
||||||
|
uint8 GetItemCount() const { return m_items.size(); }
|
||||||
|
void AddItem( uint32 item, uint32 maxcount, uint32 ptime, uint32 ExtendedCost)
|
||||||
|
{
|
||||||
|
m_items.push_back(new VendorItem(item, maxcount, ptime, ExtendedCost));
|
||||||
|
}
|
||||||
|
bool RemoveItem( uint32 item_id );
|
||||||
|
VendorItem const* FindItem(uint32 item_id) const;
|
||||||
|
|
||||||
|
void Clear()
|
||||||
|
{
|
||||||
|
for (VendorItemList::iterator itr = m_items.begin(); itr != m_items.end(); ++itr)
|
||||||
|
delete (*itr);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct VendorItemCount
|
||||||
|
{
|
||||||
|
explicit VendorItemCount(uint32 _item, uint32 _count)
|
||||||
|
: itemId(_item), count(_count), lastIncrementTime(time(NULL)) {}
|
||||||
|
|
||||||
|
uint32 itemId;
|
||||||
|
uint32 count;
|
||||||
|
time_t lastIncrementTime;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef std::list<VendorItemCount> VendorItemCounts;
|
||||||
|
|
||||||
struct TrainerSpell
|
struct TrainerSpell
|
||||||
{
|
{
|
||||||
uint32 spell;
|
uint32 spell;
|
||||||
@@ -418,41 +455,9 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||||||
uint32 GetCurrentEquipmentId() { return m_equipmentId; }
|
uint32 GetCurrentEquipmentId() { return m_equipmentId; }
|
||||||
float GetSpellDamageMod(int32 Rank);
|
float GetSpellDamageMod(int32 Rank);
|
||||||
|
|
||||||
/*********************************************************/
|
VendorItemData const* GetVendorItems() const;
|
||||||
/*** VENDOR SYSTEM ***/
|
uint32 GetVendorItemCurrentCount(VendorItem const* vItem);
|
||||||
/*********************************************************/
|
uint32 UpdateVendorItemCurrentCount(VendorItem const* vItem, uint32 used_count);
|
||||||
void LoadGoods(); // must be called before access to vendor items, lazy loading at first call
|
|
||||||
void ReloadGoods() { m_itemsLoaded = false; LoadGoods(); }
|
|
||||||
|
|
||||||
CreatureItem* GetItem(uint32 slot)
|
|
||||||
{
|
|
||||||
if(slot>=m_vendor_items.size()) return NULL;
|
|
||||||
return &m_vendor_items[slot];
|
|
||||||
}
|
|
||||||
uint8 GetItemCount() const { return m_vendor_items.size(); }
|
|
||||||
void AddItem( uint32 item, uint32 maxcount, uint32 ptime, uint32 ExtendedCost)
|
|
||||||
{
|
|
||||||
m_vendor_items.push_back(CreatureItem(item, maxcount, ptime, ExtendedCost));
|
|
||||||
}
|
|
||||||
bool RemoveItem( uint32 item_id )
|
|
||||||
{
|
|
||||||
for(CreatureItems::iterator i = m_vendor_items.begin(); i != m_vendor_items.end(); ++i )
|
|
||||||
{
|
|
||||||
if(i->id==item_id)
|
|
||||||
{
|
|
||||||
m_vendor_items.erase(i);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
CreatureItem* FindItem(uint32 item_id)
|
|
||||||
{
|
|
||||||
for(CreatureItems::iterator i = m_vendor_items.begin(); i != m_vendor_items.end(); ++i )
|
|
||||||
if(i->id==item_id)
|
|
||||||
return &*i;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
TrainerSpellData const* GetTrainerSpells() const;
|
TrainerSpellData const* GetTrainerSpells() const;
|
||||||
|
|
||||||
@@ -562,9 +567,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||||||
bool InitEntry(uint32 entry, uint32 team=ALLIANCE, const CreatureData* data=NULL);
|
bool InitEntry(uint32 entry, uint32 team=ALLIANCE, const CreatureData* data=NULL);
|
||||||
|
|
||||||
// vendor items
|
// vendor items
|
||||||
typedef std::vector<CreatureItem> CreatureItems;
|
VendorItemCounts m_vendorItemCounts;
|
||||||
CreatureItems m_vendor_items;
|
|
||||||
bool m_itemsLoaded; // vendor items loading state
|
|
||||||
|
|
||||||
void _RealtimeSetCreatureInfo();
|
void _RealtimeSetCreatureInfo();
|
||||||
|
|
||||||
@@ -592,7 +595,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||||||
uint32 m_regenTimer;
|
uint32 m_regenTimer;
|
||||||
MovementGeneratorType m_defaultMovementType;
|
MovementGeneratorType m_defaultMovementType;
|
||||||
Cell m_currentCell; // store current cell where creature listed
|
Cell m_currentCell; // store current cell where creature listed
|
||||||
uint32 m_DBTableGuid;
|
uint32 m_DBTableGuid; ///< For new or temporary creatures is 0 for saved it is lowguid
|
||||||
uint32 m_equipmentId;
|
uint32 m_equipmentId;
|
||||||
|
|
||||||
bool m_AlreadyCallAssistence;
|
bool m_AlreadyCallAssistence;
|
||||||
|
|||||||
+11
-17
@@ -54,6 +54,8 @@ GameObject::GameObject() : WorldObject()
|
|||||||
m_charges = 5;
|
m_charges = 5;
|
||||||
m_cooldownTime = 0;
|
m_cooldownTime = 0;
|
||||||
m_goInfo = NULL;
|
m_goInfo = NULL;
|
||||||
|
|
||||||
|
m_DBTableGuid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
GameObject::~GameObject()
|
GameObject::~GameObject()
|
||||||
@@ -108,7 +110,6 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, float x, float
|
|||||||
|
|
||||||
Object::_Create(guidlow, goinfo->id, HIGHGUID_GAMEOBJECT);
|
Object::_Create(guidlow, goinfo->id, HIGHGUID_GAMEOBJECT);
|
||||||
|
|
||||||
m_DBTableGuid = guidlow;
|
|
||||||
m_goInfo = goinfo;
|
m_goInfo = goinfo;
|
||||||
|
|
||||||
if (goinfo->type >= MAX_GAMEOBJECT_TYPE)
|
if (goinfo->type >= MAX_GAMEOBJECT_TYPE)
|
||||||
@@ -478,7 +479,7 @@ void GameObject::getFishLoot(Loot *fishloot)
|
|||||||
|
|
||||||
void GameObject::SaveToDB()
|
void GameObject::SaveToDB()
|
||||||
{
|
{
|
||||||
// this should only be used when the creature has already been loaded
|
// this should only be used when the gameobject has already been loaded
|
||||||
// perferably after adding to map, because mapid may not be valid otherwise
|
// perferably after adding to map, because mapid may not be valid otherwise
|
||||||
GameObjectData const *data = objmgr.GetGOData(m_DBTableGuid);
|
GameObjectData const *data = objmgr.GetGOData(m_DBTableGuid);
|
||||||
if(!data)
|
if(!data)
|
||||||
@@ -497,6 +498,8 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask)
|
|||||||
if (!goI)
|
if (!goI)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!m_DBTableGuid)
|
||||||
|
m_DBTableGuid = GetGUIDLow();
|
||||||
// update in loaded data (changing data only in this place)
|
// update in loaded data (changing data only in this place)
|
||||||
GameObjectData& data = objmgr.NewGOData(m_DBTableGuid);
|
GameObjectData& data = objmgr.NewGOData(m_DBTableGuid);
|
||||||
|
|
||||||
@@ -566,14 +569,12 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
|
|||||||
uint32 animprogress = data->animprogress;
|
uint32 animprogress = data->animprogress;
|
||||||
uint32 go_state = data->go_state;
|
uint32 go_state = data->go_state;
|
||||||
|
|
||||||
uint32 stored_guid = guid;
|
m_DBTableGuid = guid;
|
||||||
if (map->GetInstanceId() != 0) guid = objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT);
|
if (map->GetInstanceId() != 0) guid = objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT);
|
||||||
|
|
||||||
if (!Create(guid,entry, map, x, y, z, ang, rotation0, rotation1, rotation2, rotation3, animprogress, go_state) )
|
if (!Create(guid,entry, map, x, y, z, ang, rotation0, rotation1, rotation2, rotation3, animprogress, go_state) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_DBTableGuid = stored_guid;
|
|
||||||
|
|
||||||
switch(GetGOInfo()->type)
|
switch(GetGOInfo()->type)
|
||||||
{
|
{
|
||||||
case GAMEOBJECT_TYPE_DOOR:
|
case GAMEOBJECT_TYPE_DOOR:
|
||||||
@@ -589,7 +590,7 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
|
|||||||
{
|
{
|
||||||
m_spawnedByDefault = true;
|
m_spawnedByDefault = true;
|
||||||
m_respawnDelayTime = data->spawntimesecs;
|
m_respawnDelayTime = data->spawntimesecs;
|
||||||
m_respawnTime = objmgr.GetGORespawnTime(stored_guid, map->GetInstanceId());
|
m_respawnTime = objmgr.GetGORespawnTime(m_DBTableGuid, map->GetInstanceId());
|
||||||
|
|
||||||
// ready to respawn
|
// ready to respawn
|
||||||
if(m_respawnTime && m_respawnTime <= time(NULL))
|
if(m_respawnTime && m_respawnTime <= time(NULL))
|
||||||
@@ -1158,12 +1159,9 @@ void GameObject::Use(Unit* user)
|
|||||||
|
|
||||||
Player* player = (Player*)user;
|
Player* player = (Player*)user;
|
||||||
|
|
||||||
if( player->InBattleGround() && // in battleground
|
if( player->isAllowUseBattleGroundObject() )
|
||||||
!player->IsMounted() && // not mounted
|
|
||||||
!player->HasStealthAura() && // not stealthed
|
|
||||||
!player->HasInvisibilityAura() && // not invisible
|
|
||||||
player->isAlive()) // live player
|
|
||||||
{
|
{
|
||||||
|
// in battleground check
|
||||||
BattleGround *bg = player->GetBattleGround();
|
BattleGround *bg = player->GetBattleGround();
|
||||||
if(!bg)
|
if(!bg)
|
||||||
return;
|
return;
|
||||||
@@ -1186,13 +1184,9 @@ void GameObject::Use(Unit* user)
|
|||||||
|
|
||||||
Player* player = (Player*)user;
|
Player* player = (Player*)user;
|
||||||
|
|
||||||
if( player->InBattleGround() && // in battleground
|
if( player->isAllowUseBattleGroundObject() )
|
||||||
!player->IsMounted() && // not mounted
|
|
||||||
!player->HasStealthAura() && // not stealthed
|
|
||||||
!player->HasInvisibilityAura() && // not invisible
|
|
||||||
!player->HasAura(SPELL_RECENTLY_DROPPED_FLAG, 0) && // can't pickup
|
|
||||||
player->isAlive()) // live player
|
|
||||||
{
|
{
|
||||||
|
// in battleground check
|
||||||
BattleGround *bg = player->GetBattleGround();
|
BattleGround *bg = player->GetBattleGround();
|
||||||
if(!bg)
|
if(!bg)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -582,7 +582,7 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
|
|||||||
std::set<uint32> m_unique_users;
|
std::set<uint32> m_unique_users;
|
||||||
uint32 m_usetimes;
|
uint32 m_usetimes;
|
||||||
|
|
||||||
uint32 m_DBTableGuid;
|
uint32 m_DBTableGuid; ///< For new or temporary gameobjects is 0 for saved it is lowguid
|
||||||
GameObjectInfo const* m_goInfo;
|
GameObjectInfo const* m_goInfo;
|
||||||
private:
|
private:
|
||||||
void SwitchDoorOrButton(bool activate);
|
void SwitchDoorOrButton(bool activate);
|
||||||
|
|||||||
@@ -391,7 +391,7 @@ void PlayerMenu::SendQuestGiverStatus( uint8 questStatus, uint64 npcGUID )
|
|||||||
data << uint8(questStatus);
|
data << uint8(questStatus);
|
||||||
|
|
||||||
pSession->SendPacket( &data );
|
pSession->SendPacket( &data );
|
||||||
//sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u",GUID_LOPART(npcGUID),questStatus);
|
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u",GUID_LOPART(npcGUID),questStatus);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID, bool ActivateAccept )
|
void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID, bool ActivateAccept )
|
||||||
@@ -477,7 +477,7 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
|
|||||||
}
|
}
|
||||||
pSession->SendPacket( &data );
|
pSession->SendPacket( &data );
|
||||||
|
|
||||||
//sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId());
|
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId());
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
|
void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
|
||||||
@@ -515,7 +515,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
|
|||||||
WorldPacket data( SMSG_QUEST_QUERY_RESPONSE, 100 ); // guess size
|
WorldPacket data( SMSG_QUEST_QUERY_RESPONSE, 100 ); // guess size
|
||||||
|
|
||||||
data << uint32(pQuest->GetQuestId());
|
data << uint32(pQuest->GetQuestId());
|
||||||
data << uint32(pQuest->GetMinLevel()); // not MinLevel. Accepted values: 0, 1 or 2 Possible theory for future dev: 0==cannot in quest log, 1==can in quest log session only(removed on log out), 2==can in quest log always (save to db)
|
data << uint32(pQuest->GetQuestMethod()); // Accepted values: 0, 1 or 2. 0==IsAutoComplete() (skip objectives/details)
|
||||||
data << uint32(pQuest->GetQuestLevel()); // may be 0
|
data << uint32(pQuest->GetQuestLevel()); // may be 0
|
||||||
data << uint32(pQuest->GetZoneOrSort()); // zone or sort to display in quest log
|
data << uint32(pQuest->GetZoneOrSort()); // zone or sort to display in quest log
|
||||||
|
|
||||||
@@ -597,7 +597,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
|
|||||||
data << ObjectiveText[iI];
|
data << ObjectiveText[iI];
|
||||||
|
|
||||||
pSession->SendPacket( &data );
|
pSession->SendPacket( &data );
|
||||||
//sLog.outDebug( "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u",pQuest->GetQuestId() );
|
sLog.outDebug( "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u",pQuest->GetQuestId() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID, bool EnbleNext )
|
void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID, bool EnbleNext )
|
||||||
@@ -679,7 +679,7 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
|
|||||||
data << uint32(pQuest->GetRewSpellCast()); // casted spell
|
data << uint32(pQuest->GetRewSpellCast()); // casted spell
|
||||||
data << uint32(0); // Honor points reward, not implemented
|
data << uint32(0); // Honor points reward, not implemented
|
||||||
pSession->SendPacket( &data );
|
pSession->SendPacket( &data );
|
||||||
//sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId() );
|
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID, bool Completable, bool CloseOnCancel )
|
void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID, bool Completable, bool CloseOnCancel )
|
||||||
@@ -758,5 +758,5 @@ void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID
|
|||||||
data << uint32(0x04) << uint32(0x08) << uint32(0x10);
|
data << uint32(0x04) << uint32(0x08) << uint32(0x10);
|
||||||
|
|
||||||
pSession->SendPacket( &data );
|
pSession->SendPacket( &data );
|
||||||
//sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId() );
|
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId() );
|
||||||
}
|
}
|
||||||
|
|||||||
+16
-26
@@ -680,13 +680,16 @@ void WorldSession::SendListInventory( uint64 vendorguid )
|
|||||||
|
|
||||||
// Stop the npc if moving
|
// Stop the npc if moving
|
||||||
pCreature->StopMoving();
|
pCreature->StopMoving();
|
||||||
// load vendor items if not yet
|
|
||||||
pCreature->LoadGoods();
|
|
||||||
|
|
||||||
uint8 numitems = pCreature->GetItemCount();
|
VendorItemData const* vItems = pCreature->GetVendorItems();
|
||||||
|
if(!vItems)
|
||||||
|
{
|
||||||
|
_player->SendSellError( SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8 numitems = vItems->GetItemCount();
|
||||||
uint8 count = 0;
|
uint8 count = 0;
|
||||||
uint32 ptime = time(NULL);
|
|
||||||
uint32 diff;
|
|
||||||
|
|
||||||
WorldPacket data( SMSG_LIST_INVENTORY, (8+1+numitems*8*4) );
|
WorldPacket data( SMSG_LIST_INVENTORY, (8+1+numitems*8*4) );
|
||||||
data << uint64(vendorguid);
|
data << uint64(vendorguid);
|
||||||
@@ -694,37 +697,24 @@ void WorldSession::SendListInventory( uint64 vendorguid )
|
|||||||
|
|
||||||
float discountMod = _player->GetReputationPriceDiscount(pCreature);
|
float discountMod = _player->GetReputationPriceDiscount(pCreature);
|
||||||
|
|
||||||
ItemPrototype const *pProto;
|
|
||||||
for(int i = 0; i < numitems; i++ )
|
for(int i = 0; i < numitems; i++ )
|
||||||
{
|
{
|
||||||
CreatureItem* crItem = pCreature->GetItem(i);
|
if(VendorItem const* crItem = vItems->GetItem(i))
|
||||||
if( crItem )
|
|
||||||
{
|
{
|
||||||
pProto = objmgr.GetItemPrototype(crItem->id);
|
if(ItemPrototype const *pProto = objmgr.GetItemPrototype(crItem->item))
|
||||||
if( pProto )
|
|
||||||
{
|
{
|
||||||
if((pProto->AllowableClass & _player->getClassMask()) == 0 && pProto->Bonding == BIND_WHEN_PICKED_UP && !_player->isGameMaster())
|
if((pProto->AllowableClass & _player->getClassMask()) == 0 && pProto->Bonding == BIND_WHEN_PICKED_UP && !_player->isGameMaster())
|
||||||
continue;
|
continue;
|
||||||
++count;
|
|
||||||
if( crItem->incrtime != 0 && (crItem->lastincr + crItem->incrtime <= ptime) )
|
|
||||||
{
|
|
||||||
diff = uint32((ptime - crItem->lastincr)/crItem->incrtime);
|
|
||||||
if( (crItem->count + diff * pProto->BuyCount) <= crItem->maxcount )
|
|
||||||
crItem->count += diff * pProto->BuyCount;
|
|
||||||
else
|
|
||||||
crItem->count = crItem->maxcount;
|
|
||||||
crItem->lastincr = ptime;
|
|
||||||
}
|
|
||||||
data << uint32(count);
|
|
||||||
data << uint32(crItem->id);
|
|
||||||
data << uint32(pProto->DisplayInfoID);
|
|
||||||
data << uint32(crItem->maxcount <= 0 ? 0xFFFFFFFF : crItem->count);
|
|
||||||
|
|
||||||
uint32 price = pProto->BuyPrice;
|
++count;
|
||||||
|
|
||||||
// reputation discount
|
// reputation discount
|
||||||
price = uint32(floor(pProto->BuyPrice * discountMod));
|
uint32 price = uint32(floor(pProto->BuyPrice * discountMod));
|
||||||
|
|
||||||
|
data << uint32(count);
|
||||||
|
data << uint32(crItem->item);
|
||||||
|
data << uint32(pProto->DisplayInfoID);
|
||||||
|
data << uint32(crItem->maxcount <= 0 ? 0xFFFFFFFF : pCreature->GetVendorItemCurrentCount(crItem));
|
||||||
data << uint32(price);
|
data << uint32(price);
|
||||||
data << uint32(pProto->MaxDurability);
|
data << uint32(pProto->MaxDurability);
|
||||||
data << uint32(pProto->BuyCount);
|
data << uint32(pProto->BuyCount);
|
||||||
|
|||||||
@@ -303,6 +303,7 @@ enum MangosStrings
|
|||||||
LANG_LOOKUP_PLAYER_ACCOUNT = 328,
|
LANG_LOOKUP_PLAYER_ACCOUNT = 328,
|
||||||
LANG_LOOKUP_PLAYER_CHARACTER = 329,
|
LANG_LOOKUP_PLAYER_CHARACTER = 329,
|
||||||
LANG_NO_PLAYERS_FOUND = 330,
|
LANG_NO_PLAYERS_FOUND = 330,
|
||||||
|
LANG_EXTENDED_COST_NOT_EXIST = 331,
|
||||||
|
|
||||||
// Room for more level 2
|
// Room for more level 2
|
||||||
|
|
||||||
|
|||||||
+16
-53
@@ -1237,14 +1237,6 @@ bool ChatHandler::HandleAddVendorItemCommand(const char* args)
|
|||||||
if (!*args)
|
if (!*args)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Creature* vendor = getSelectedCreature();
|
|
||||||
if (!vendor || !vendor->isVendor())
|
|
||||||
{
|
|
||||||
SendSysMessage(LANG_COMMAND_VENDORSELECTION);
|
|
||||||
SetSentErrorMessage(true);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
char* pitem = extractKeyFromLink((char*)args,"Hitem");
|
char* pitem = extractKeyFromLink((char*)args,"Hitem");
|
||||||
if (!pitem)
|
if (!pitem)
|
||||||
{
|
{
|
||||||
@@ -1252,6 +1244,7 @@ bool ChatHandler::HandleAddVendorItemCommand(const char* args)
|
|||||||
SetSentErrorMessage(true);
|
SetSentErrorMessage(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 itemId = atol(pitem);
|
uint32 itemId = atol(pitem);
|
||||||
|
|
||||||
char* fmaxcount = strtok(NULL, " "); //add maxcount, default: 0
|
char* fmaxcount = strtok(NULL, " "); //add maxcount, default: 0
|
||||||
@@ -1267,41 +1260,20 @@ bool ChatHandler::HandleAddVendorItemCommand(const char* args)
|
|||||||
char* fextendedcost = strtok(NULL, " "); //add ExtendedCost, default: 0
|
char* fextendedcost = strtok(NULL, " "); //add ExtendedCost, default: 0
|
||||||
uint32 extendedcost = fextendedcost ? atol(fextendedcost) : 0;
|
uint32 extendedcost = fextendedcost ? atol(fextendedcost) : 0;
|
||||||
|
|
||||||
|
Creature* vendor = getSelectedCreature();
|
||||||
|
|
||||||
|
uint32 vendor_entry = vendor ? vendor->GetEntry() : 0;
|
||||||
|
|
||||||
|
if(!objmgr.IsVendorItemValid(vendor_entry,itemId,maxcount,incrtime,extendedcost,m_session->GetPlayer()))
|
||||||
|
{
|
||||||
|
SetSentErrorMessage(true);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
objmgr.AddVendorItem(vendor_entry,itemId,maxcount,incrtime,extendedcost);
|
||||||
|
|
||||||
ItemPrototype const* pProto = objmgr.GetItemPrototype(itemId);
|
ItemPrototype const* pProto = objmgr.GetItemPrototype(itemId);
|
||||||
if(!pProto)
|
|
||||||
{
|
|
||||||
PSendSysMessage(LANG_ITEM_NOT_FOUND, itemId);
|
|
||||||
SetSentErrorMessage(true);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(extendedcost && !sItemExtendedCostStore.LookupEntry(extendedcost))
|
|
||||||
{
|
|
||||||
PSendSysMessage(LANG_BAD_VALUE, extendedcost);
|
|
||||||
SetSentErrorMessage(true);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// load vendor items if not yet
|
|
||||||
vendor->LoadGoods();
|
|
||||||
|
|
||||||
if(vendor->FindItem(itemId))
|
|
||||||
{
|
|
||||||
PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST,itemId);
|
|
||||||
SetSentErrorMessage(true);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vendor->GetItemCount() >= MAX_VENDOR_ITEMS)
|
|
||||||
{
|
|
||||||
SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
|
|
||||||
SetSentErrorMessage(true);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// add to DB and to current ingame vendor
|
|
||||||
WorldDatabase.PExecuteLog("INSERT INTO npc_vendor (entry,item,maxcount,incrtime,extendedcost) VALUES('%u','%u','%u','%u','%u')",vendor->GetEntry(), itemId, maxcount,incrtime,extendedcost);
|
|
||||||
vendor->AddItem(itemId,maxcount,incrtime,extendedcost);
|
|
||||||
PSendSysMessage(LANG_ITEM_ADDED_TO_LIST,itemId,pProto->Name1,maxcount,incrtime,extendedcost);
|
PSendSysMessage(LANG_ITEM_ADDED_TO_LIST,itemId,pProto->Name1,maxcount,incrtime,extendedcost);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1329,25 +1301,16 @@ bool ChatHandler::HandleDelVendorItemCommand(const char* args)
|
|||||||
}
|
}
|
||||||
uint32 itemId = atol(pitem);
|
uint32 itemId = atol(pitem);
|
||||||
|
|
||||||
ItemPrototype const *pProto = objmgr.GetItemPrototype(itemId);
|
|
||||||
if(!pProto)
|
|
||||||
{
|
|
||||||
PSendSysMessage(LANG_ITEM_NOT_FOUND, itemId);
|
|
||||||
SetSentErrorMessage(true);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// load vendor items if not yet
|
if(!objmgr.RemoveVendorItem(vendor->GetEntry(),itemId))
|
||||||
vendor->LoadGoods();
|
|
||||||
|
|
||||||
if (!vendor->RemoveItem(itemId))
|
|
||||||
{
|
{
|
||||||
PSendSysMessage(LANG_ITEM_NOT_IN_LIST,itemId);
|
PSendSysMessage(LANG_ITEM_NOT_IN_LIST,itemId);
|
||||||
SetSentErrorMessage(true);
|
SetSentErrorMessage(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldDatabase.PExecuteLog("DELETE FROM npc_vendor WHERE entry='%u' AND item='%u'",vendor->GetEntry(), itemId);
|
ItemPrototype const* pProto = objmgr.GetItemPrototype(itemId);
|
||||||
|
|
||||||
PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST,itemId,pProto->Name1);
|
PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST,itemId,pProto->Name1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
+185
-64
@@ -70,6 +70,40 @@ bool normalizePlayerName(std::string& name)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LanguageDesc lang_description[LANGUAGES_COUNT] =
|
||||||
|
{
|
||||||
|
{ LANG_ADDON, 0, 0 },
|
||||||
|
{ LANG_UNIVERSAL, 0, 0 },
|
||||||
|
{ LANG_ORCISH, 669, SKILL_LANG_ORCISH },
|
||||||
|
{ LANG_DARNASSIAN, 671, SKILL_LANG_DARNASSIAN },
|
||||||
|
{ LANG_TAURAHE, 670, SKILL_LANG_TAURAHE },
|
||||||
|
{ LANG_DWARVISH, 672, SKILL_LANG_DWARVEN },
|
||||||
|
{ LANG_COMMON, 668, SKILL_LANG_COMMON },
|
||||||
|
{ LANG_DEMONIC, 815, SKILL_LANG_DEMON_TONGUE },
|
||||||
|
{ LANG_TITAN, 816, SKILL_LANG_TITAN },
|
||||||
|
{ LANG_THALASSIAN, 813, SKILL_LANG_THALASSIAN },
|
||||||
|
{ LANG_DRACONIC, 814, SKILL_LANG_DRACONIC },
|
||||||
|
{ LANG_KALIMAG, 817, SKILL_LANG_OLD_TONGUE },
|
||||||
|
{ LANG_GNOMISH, 7340, SKILL_LANG_GNOMISH },
|
||||||
|
{ LANG_TROLL, 7341, SKILL_LANG_TROLL },
|
||||||
|
{ LANG_GUTTERSPEAK, 17737, SKILL_LANG_GUTTERSPEAK },
|
||||||
|
{ LANG_DRAENEI, 29932, SKILL_LANG_DRAENEI },
|
||||||
|
{ LANG_ZOMBIE, 0, 0 },
|
||||||
|
{ LANG_GNOMISH_BINARY, 0, 0 },
|
||||||
|
{ LANG_GOBLIN_BINARY, 0, 0 }
|
||||||
|
};
|
||||||
|
|
||||||
|
LanguageDesc const* GetLanguageDescByID(uint32 lang)
|
||||||
|
{
|
||||||
|
for(int i = 0; i < LANGUAGES_COUNT; ++i)
|
||||||
|
{
|
||||||
|
if(uint32(lang_description[i].lang_id) == lang)
|
||||||
|
return &lang_description[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
ObjectMgr::ObjectMgr()
|
ObjectMgr::ObjectMgr()
|
||||||
{
|
{
|
||||||
m_hiCharGuid = 1;
|
m_hiCharGuid = 1;
|
||||||
@@ -134,8 +168,7 @@ ObjectMgr::~ObjectMgr()
|
|||||||
delete itr->second;
|
delete itr->second;
|
||||||
|
|
||||||
for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
|
for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
|
||||||
for (VendorItemList::iterator itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2)
|
itr->second.Clear();
|
||||||
delete (*itr2);
|
|
||||||
|
|
||||||
for (CacheTrainerSpellMap::iterator itr = m_mCacheTrainerSpellMap.begin(); itr != m_mCacheTrainerSpellMap.end(); ++itr)
|
for (CacheTrainerSpellMap::iterator itr = m_mCacheTrainerSpellMap.begin(); itr != m_mCacheTrainerSpellMap.end(); ++itr)
|
||||||
itr->second.Clear();
|
itr->second.Clear();
|
||||||
@@ -2697,35 +2730,35 @@ void ObjectMgr::LoadQuests()
|
|||||||
|
|
||||||
mExclusiveQuestGroups.clear();
|
mExclusiveQuestGroups.clear();
|
||||||
|
|
||||||
// 0 1 2 3 4 5 6 7
|
// 0 1 2 3 4 5 6 7 8
|
||||||
QueryResult *result = WorldDatabase.Query("SELECT entry, ZoneOrSort, SkillOrClass, MinLevel, QuestLevel, Type, RequiredRaces, RequiredSkillValue,"
|
QueryResult *result = WorldDatabase.Query("SELECT entry, Method, ZoneOrSort, SkillOrClass, MinLevel, QuestLevel, Type, RequiredRaces, RequiredSkillValue,"
|
||||||
// 8 9 10 11 12 13 14 15
|
// 9 10 11 12 13 14 15 16
|
||||||
"RepObjectiveFaction, RepObjectiveValue, RequiredMinRepFaction, RequiredMinRepValue, RequiredMaxRepFaction, RequiredMaxRepValue, SuggestedPlayers, LimitTime,"
|
"RepObjectiveFaction, RepObjectiveValue, RequiredMinRepFaction, RequiredMinRepValue, RequiredMaxRepFaction, RequiredMaxRepValue, SuggestedPlayers, LimitTime,"
|
||||||
// 16 17 18 19 20 21 22 23 24 25
|
// 17 18 19 20 21 22 23 24 25 26
|
||||||
"QuestFlags, SpecialFlags, CharTitleId, PrevQuestId, NextQuestId, ExclusiveGroup, NextQuestInChain, SrcItemId, SrcItemCount, SrcSpell,"
|
"QuestFlags, SpecialFlags, CharTitleId, PrevQuestId, NextQuestId, ExclusiveGroup, NextQuestInChain, SrcItemId, SrcItemCount, SrcSpell,"
|
||||||
// 26 27 28 29 30 31 32 33 34 35
|
// 27 28 29 30 31 32 33 34 35 36
|
||||||
"Title, Details, Objectives, OfferRewardText, RequestItemsText, EndText, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4,"
|
"Title, Details, Objectives, OfferRewardText, RequestItemsText, EndText, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4,"
|
||||||
// 36 37 38 39 40 41 42 43
|
// 37 38 39 40 41 42 43 44
|
||||||
"ReqItemId1, ReqItemId2, ReqItemId3, ReqItemId4, ReqItemCount1, ReqItemCount2, ReqItemCount3, ReqItemCount4,"
|
"ReqItemId1, ReqItemId2, ReqItemId3, ReqItemId4, ReqItemCount1, ReqItemCount2, ReqItemCount3, ReqItemCount4,"
|
||||||
// 44 45 46 47 48 49 50 51 52 53 54 55
|
// 45 46 47 48 49 50 51 52 53 54 54 55
|
||||||
"ReqSourceId1, ReqSourceId2, ReqSourceId3, ReqSourceId4, ReqSourceCount1, ReqSourceCount2, ReqSourceCount3, ReqSourceCount4, ReqSourceRef1, ReqSourceRef2, ReqSourceRef3, ReqSourceRef4,"
|
"ReqSourceId1, ReqSourceId2, ReqSourceId3, ReqSourceId4, ReqSourceCount1, ReqSourceCount2, ReqSourceCount3, ReqSourceCount4, ReqSourceRef1, ReqSourceRef2, ReqSourceRef3, ReqSourceRef4,"
|
||||||
// 56 57 58 59 60 61 62 63
|
// 57 58 59 60 61 62 63 64
|
||||||
"ReqCreatureOrGOId1, ReqCreatureOrGOId2, ReqCreatureOrGOId3, ReqCreatureOrGOId4, ReqCreatureOrGOCount1, ReqCreatureOrGOCount2, ReqCreatureOrGOCount3, ReqCreatureOrGOCount4,"
|
"ReqCreatureOrGOId1, ReqCreatureOrGOId2, ReqCreatureOrGOId3, ReqCreatureOrGOId4, ReqCreatureOrGOCount1, ReqCreatureOrGOCount2, ReqCreatureOrGOCount3, ReqCreatureOrGOCount4,"
|
||||||
// 64 65 66 67
|
// 65 66 67 68
|
||||||
"ReqSpellCast1, ReqSpellCast2, ReqSpellCast3, ReqSpellCast4,"
|
"ReqSpellCast1, ReqSpellCast2, ReqSpellCast3, ReqSpellCast4,"
|
||||||
// 68 69 70 71 72 73
|
// 69 70 71 72 73 74
|
||||||
"RewChoiceItemId1, RewChoiceItemId2, RewChoiceItemId3, RewChoiceItemId4, RewChoiceItemId5, RewChoiceItemId6,"
|
"RewChoiceItemId1, RewChoiceItemId2, RewChoiceItemId3, RewChoiceItemId4, RewChoiceItemId5, RewChoiceItemId6,"
|
||||||
// 74 75 76 77 78 79
|
// 75 76 77 78 79 80
|
||||||
"RewChoiceItemCount1, RewChoiceItemCount2, RewChoiceItemCount3, RewChoiceItemCount4, RewChoiceItemCount5, RewChoiceItemCount6,"
|
"RewChoiceItemCount1, RewChoiceItemCount2, RewChoiceItemCount3, RewChoiceItemCount4, RewChoiceItemCount5, RewChoiceItemCount6,"
|
||||||
// 80 81 82 83 84 85 86 87
|
// 81 82 83 84 85 86 87 88
|
||||||
"RewItemId1, RewItemId2, RewItemId3, RewItemId4, RewItemCount1, RewItemCount2, RewItemCount3, RewItemCount4,"
|
"RewItemId1, RewItemId2, RewItemId3, RewItemId4, RewItemCount1, RewItemCount2, RewItemCount3, RewItemCount4,"
|
||||||
// 88 89 90 91 92 93 94 95 96 97
|
// 89 90 91 92 93 94 95 96 97 98
|
||||||
"RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5,"
|
"RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5,"
|
||||||
// 98 99 100 101 102 103 104 105 106 107
|
// 99 100 101 102 103 104 105 106 107 108
|
||||||
"RewOrReqMoney, RewMoneyMaxLevel, RewSpell, RewSpellCast, RewMailTemplateId, RewMailDelaySecs, PointMapId, PointX, PointY, PointOpt,"
|
"RewOrReqMoney, RewMoneyMaxLevel, RewSpell, RewSpellCast, RewMailTemplateId, RewMailDelaySecs, PointMapId, PointX, PointY, PointOpt,"
|
||||||
// 108 109 110 111 112 113 114 115 116 117
|
// 109 110 111 112 113 114 115 116 117 118
|
||||||
"DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4,IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4,"
|
"DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4,IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4,"
|
||||||
// 118 119
|
// 119 120
|
||||||
"StartScript, CompleteScript"
|
"StartScript, CompleteScript"
|
||||||
" FROM quest_template");
|
" FROM quest_template");
|
||||||
if(result == NULL)
|
if(result == NULL)
|
||||||
@@ -2761,6 +2794,11 @@ void ObjectMgr::LoadQuests()
|
|||||||
|
|
||||||
// additional quest integrity checks (GO, creature_template and item_template must be loaded already)
|
// additional quest integrity checks (GO, creature_template and item_template must be loaded already)
|
||||||
|
|
||||||
|
if( qinfo->GetQuestMethod() >= 3 )
|
||||||
|
{
|
||||||
|
sLog.outErrorDb("Quest %u has `Method` = %u, expected values are 0, 1 or 2.",qinfo->GetQuestId(),qinfo->GetQuestMethod());
|
||||||
|
}
|
||||||
|
|
||||||
if (qinfo->QuestFlags & ~QUEST_MANGOS_FLAGS_DB_ALLOWED)
|
if (qinfo->QuestFlags & ~QUEST_MANGOS_FLAGS_DB_ALLOWED)
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Quest %u has `SpecialFlags` = %u > max allowed value. Correct `SpecialFlags` to value <= %u",
|
sLog.outErrorDb("Quest %u has `SpecialFlags` = %u > max allowed value. Correct `SpecialFlags` to value <= %u",
|
||||||
@@ -6148,14 +6186,14 @@ bool ObjectMgr::LoadMangosStrings(DatabaseType& db, char const* table, int32 min
|
|||||||
|
|
||||||
if(entry==0)
|
if(entry==0)
|
||||||
{
|
{
|
||||||
sLog.outString("Table `%s` contain reserved entry 0, ignored.",table);
|
sLog.outErrorDb("Table `%s` contain reserved entry 0, ignored.",table);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if(entry < min_value || entry > max_value)
|
else if(entry < min_value || entry > max_value)
|
||||||
{
|
{
|
||||||
int32 start = min_value > 0 ? min_value : max_value;
|
int32 start = min_value > 0 ? min_value : max_value;
|
||||||
int32 end = min_value > 0 ? max_value : min_value;
|
int32 end = min_value > 0 ? max_value : min_value;
|
||||||
sLog.outString("Table `%s` contain entry %i out of allowed range (%d - %d), ignored.",table,entry,start,end);
|
sLog.outErrorDb("Table `%s` contain entry %i out of allowed range (%d - %d), ignored.",table,entry,start,end);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6163,7 +6201,7 @@ bool ObjectMgr::LoadMangosStrings(DatabaseType& db, char const* table, int32 min
|
|||||||
|
|
||||||
if(data.Content.size() > 0)
|
if(data.Content.size() > 0)
|
||||||
{
|
{
|
||||||
sLog.outString("Table `%s` contain data for already loaded entry %i (from another table?), ignored.",table,entry);
|
sLog.outErrorDb("Table `%s` contain data for already loaded entry %i (from another table?), ignored.",table,entry);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6656,22 +6694,30 @@ void ObjectMgr::LoadTrainerSpell()
|
|||||||
|
|
||||||
barGoLink bar( result->GetRowCount() );
|
barGoLink bar( result->GetRowCount() );
|
||||||
|
|
||||||
uint32 count = 0,entry,spell;
|
uint32 count = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
bar.step();
|
bar.step();
|
||||||
|
|
||||||
Field* fields = result->Fetch();
|
Field* fields = result->Fetch();
|
||||||
|
|
||||||
entry = fields[0].GetUInt32();
|
uint32 entry = fields[0].GetUInt32();
|
||||||
spell = fields[1].GetUInt32();
|
uint32 spell = fields[1].GetUInt32();
|
||||||
|
|
||||||
if(!GetCreatureTemplate(entry))
|
CreatureInfo const* cInfo = GetCreatureTemplate(entry);
|
||||||
|
|
||||||
|
if(!cInfo)
|
||||||
{
|
{
|
||||||
sLog.outErrorDb("Table `npc_trainer` have entry for not existed creature template (Entry: %u), ignore", entry);
|
sLog.outErrorDb("Table `npc_trainer` have entry for not existed creature template (Entry: %u), ignore", entry);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!(cInfo->npcflag & UNIT_NPC_FLAG_TRAINER))
|
||||||
|
{
|
||||||
|
sLog.outErrorDb("Table `npc_trainer` have data for not creature template (Entry: %u) without trainer flag, ignore", entry);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
SpellEntry const *spellinfo = sSpellStore.LookupEntry(spell);
|
SpellEntry const *spellinfo = sSpellStore.LookupEntry(spell);
|
||||||
if(!spellinfo)
|
if(!spellinfo)
|
||||||
{
|
{
|
||||||
@@ -6715,10 +6761,7 @@ void ObjectMgr::LoadVendors()
|
|||||||
{
|
{
|
||||||
// For reload case
|
// For reload case
|
||||||
for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
|
for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
|
||||||
{
|
itr->second.Clear();
|
||||||
for (VendorItemList::iterator itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2)
|
|
||||||
delete (*itr2);
|
|
||||||
}
|
|
||||||
m_mCacheVendorItemMap.clear();
|
m_mCacheVendorItemMap.clear();
|
||||||
|
|
||||||
QueryResult *result = WorldDatabase.PQuery("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM npc_vendor");
|
QueryResult *result = WorldDatabase.PQuery("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM npc_vendor");
|
||||||
@@ -6736,48 +6779,23 @@ void ObjectMgr::LoadVendors()
|
|||||||
barGoLink bar( result->GetRowCount() );
|
barGoLink bar( result->GetRowCount() );
|
||||||
|
|
||||||
uint32 count = 0;
|
uint32 count = 0;
|
||||||
uint32 entry, item_id, ExtendedCost;
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
bar.step();
|
bar.step();
|
||||||
Field* fields = result->Fetch();
|
Field* fields = result->Fetch();
|
||||||
|
|
||||||
entry = fields[0].GetUInt32();
|
uint32 entry = fields[0].GetUInt32();
|
||||||
if(!GetCreatureTemplate(entry))
|
uint32 item_id = fields[1].GetUInt32();
|
||||||
{
|
uint32 maxcount = fields[2].GetUInt32();
|
||||||
sLog.outErrorDb("Table `npc_vendor` have data for not existed creature template (Entry: %u), ignore", entry);
|
uint32 incrtime = fields[3].GetUInt32();
|
||||||
|
uint32 ExtendedCost = fields[4].GetUInt32();
|
||||||
|
|
||||||
|
if(!IsVendorItemValid(entry,item_id,maxcount,incrtime,ExtendedCost))
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
item_id = fields[1].GetUInt32();
|
VendorItemData& vList = m_mCacheVendorItemMap[entry];
|
||||||
if(!GetItemPrototype(item_id))
|
|
||||||
{
|
|
||||||
sLog.outErrorDb("Table `npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore",entry,item_id);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
ExtendedCost = fields[4].GetUInt32();
|
vList.AddItem(item_id,maxcount,incrtime,ExtendedCost);
|
||||||
if(ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost))
|
|
||||||
{
|
|
||||||
sLog.outErrorDb("Table `npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore",item_id,ExtendedCost,entry);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
VendorItemList& vList = m_mCacheVendorItemMap[entry];
|
|
||||||
|
|
||||||
if(vList.size() >= MAX_VENDOR_ITEMS)
|
|
||||||
{
|
|
||||||
sLog.outErrorDb( "Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vList.size(), MAX_VENDOR_ITEMS, entry);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
VendorItem* pVendorItem = new VendorItem();
|
|
||||||
pVendorItem->item = item_id;
|
|
||||||
pVendorItem->maxcount = fields[2].GetUInt32();
|
|
||||||
pVendorItem->incrtime = fields[3].GetUInt32();
|
|
||||||
pVendorItem->ExtendedCost = ExtendedCost;
|
|
||||||
|
|
||||||
vList.push_back(pVendorItem);
|
|
||||||
++count;
|
++count;
|
||||||
|
|
||||||
} while (result->NextRow());
|
} while (result->NextRow());
|
||||||
@@ -6838,6 +6856,109 @@ void ObjectMgr::LoadNpcTextId()
|
|||||||
sLog.outString( ">> Loaded %d NpcTextId ", count );
|
sLog.outString( ">> Loaded %d NpcTextId ", count );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObjectMgr::AddVendorItem( uint32 entry,uint32 item, uint32 maxcount, uint32 incrtime, uint32 extendedcost )
|
||||||
|
{
|
||||||
|
VendorItemData& vList = m_mCacheVendorItemMap[entry];
|
||||||
|
vList.AddItem(item,maxcount,incrtime,extendedcost);
|
||||||
|
|
||||||
|
WorldDatabase.PExecuteLog("INSERT INTO npc_vendor (entry,item,maxcount,incrtime,extendedcost) VALUES('%u','%u','%u','%u','%u')",entry, item, maxcount,incrtime,extendedcost);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ObjectMgr::RemoveVendorItem( uint32 entry,uint32 item )
|
||||||
|
{
|
||||||
|
CacheVendorItemMap::iterator iter = m_mCacheVendorItemMap.find(entry);
|
||||||
|
if(iter == m_mCacheVendorItemMap.end())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if(!iter->second.FindItem(item))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
iter->second.RemoveItem(item);
|
||||||
|
WorldDatabase.PExecuteLog("DELETE FROM npc_vendor WHERE entry='%u' AND item='%u'",entry, item);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ObjectMgr::IsVendorItemValid( uint32 vendor_entry, uint32 item_id, uint32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* pl ) const
|
||||||
|
{
|
||||||
|
CreatureInfo const* cInfo = GetCreatureTemplate(vendor_entry);
|
||||||
|
if(!cInfo)
|
||||||
|
{
|
||||||
|
if(pl)
|
||||||
|
ChatHandler(pl).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
|
||||||
|
else
|
||||||
|
sLog.outErrorDb("Table `npc_vendor` have data for not existed creature template (Entry: %u), ignore", vendor_entry);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(cInfo->npcflag & UNIT_NPC_FLAG_VENDOR))
|
||||||
|
{
|
||||||
|
if(pl)
|
||||||
|
ChatHandler(pl).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
|
||||||
|
else
|
||||||
|
sLog.outErrorDb("Table `npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!GetItemPrototype(item_id))
|
||||||
|
{
|
||||||
|
if(pl)
|
||||||
|
ChatHandler(pl).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id);
|
||||||
|
else
|
||||||
|
sLog.outErrorDb("Table `npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore",vendor_entry,item_id);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost))
|
||||||
|
{
|
||||||
|
if(pl)
|
||||||
|
ChatHandler(pl).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST,ExtendedCost);
|
||||||
|
else
|
||||||
|
sLog.outErrorDb("Table `npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore",item_id,ExtendedCost,vendor_entry);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(maxcount > 0 && incrtime == 0)
|
||||||
|
{
|
||||||
|
if(pl)
|
||||||
|
ChatHandler(pl).PSendSysMessage("MaxCount!=0 (%u) but IncrTime==0", maxcount);
|
||||||
|
else
|
||||||
|
sLog.outErrorDb( "Table `npc_vendor` has `maxcount` (%u) for item %u of vendor (Entry: %u) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if(maxcount==0 && incrtime > 0)
|
||||||
|
{
|
||||||
|
if(pl)
|
||||||
|
ChatHandler(pl).PSendSysMessage("MaxCount==0 but IncrTime<>=0");
|
||||||
|
else
|
||||||
|
sLog.outErrorDb( "Table `npc_vendor` has `maxcount`=0 for item %u of vendor (Entry: %u) but `incrtime`<>0, ignore", item_id, vendor_entry);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
VendorItemData const* vItems = GetNpcVendorItemList(vendor_entry);
|
||||||
|
if(!vItems)
|
||||||
|
return true; // later checks for non-empty lists
|
||||||
|
|
||||||
|
if(vItems->FindItem(item_id))
|
||||||
|
{
|
||||||
|
if(pl)
|
||||||
|
ChatHandler(pl).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST,item_id);
|
||||||
|
else
|
||||||
|
sLog.outErrorDb( "Table `npc_vendor` has duplicate items %u for vendor (Entry: %u), ignore", item_id, vendor_entry);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(vItems->GetItemCount() >= MAX_VENDOR_ITEMS)
|
||||||
|
{
|
||||||
|
if(pl)
|
||||||
|
ChatHandler(pl).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
|
||||||
|
else
|
||||||
|
sLog.outErrorDb( "Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vItems->GetItemCount(), MAX_VENDOR_ITEMS, vendor_entry);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Functions for scripting access
|
// Functions for scripting access
|
||||||
const char* GetAreaTriggerScriptNameById(uint32 id)
|
const char* GetAreaTriggerScriptNameById(uint32 id)
|
||||||
{
|
{
|
||||||
@@ -6848,7 +6969,7 @@ bool LoadMangosStrings(DatabaseType& db, char const* table,int32 start_value, in
|
|||||||
{
|
{
|
||||||
if(start_value >= 0 || start_value <= end_value) // start/end reversed for negative values
|
if(start_value >= 0 || start_value <= end_value) // start/end reversed for negative values
|
||||||
{
|
{
|
||||||
sLog.outError("Table '%s' attempt loaded with invalid range (%d - %d), use (%d - %d) instead.",table,start_value,end_value,-1,std::numeric_limits<int32>::min());
|
sLog.outErrorDb("Table '%s' attempt loaded with invalid range (%d - %d), use (%d - %d) instead.",table,start_value,end_value,-1,std::numeric_limits<int32>::min());
|
||||||
start_value = -1;
|
start_value = -1;
|
||||||
end_value = std::numeric_limits<int32>::min();
|
end_value = std::numeric_limits<int32>::min();
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-12
@@ -228,18 +228,8 @@ struct PlayerCondition
|
|||||||
// NPC gossip text id
|
// NPC gossip text id
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, uint32> CacheNpcTextIdMap;
|
typedef HM_NAMESPACE::hash_map<uint32, uint32> CacheNpcTextIdMap;
|
||||||
|
|
||||||
// Vendors
|
|
||||||
struct VendorItem
|
|
||||||
{
|
|
||||||
uint32 item;
|
|
||||||
uint32 maxcount;
|
|
||||||
uint32 incrtime;
|
|
||||||
uint32 ExtendedCost;
|
|
||||||
};
|
|
||||||
typedef std::vector<VendorItem*> VendorItemList;
|
|
||||||
|
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, VendorItemList> CacheVendorItemMap;
|
|
||||||
|
|
||||||
|
typedef HM_NAMESPACE::hash_map<uint32, VendorItemData> CacheVendorItemMap;
|
||||||
typedef HM_NAMESPACE::hash_map<uint32, TrainerSpellData> CacheTrainerSpellMap;
|
typedef HM_NAMESPACE::hash_map<uint32, TrainerSpellData> CacheTrainerSpellMap;
|
||||||
|
|
||||||
enum SkillRangeType
|
enum SkillRangeType
|
||||||
@@ -258,6 +248,16 @@ SkillRangeType GetSkillRangeType(SkillLineEntry const *pSkill, bool racial);
|
|||||||
|
|
||||||
bool normalizePlayerName(std::string& name);
|
bool normalizePlayerName(std::string& name);
|
||||||
|
|
||||||
|
struct MANGOS_DLL_SPEC LanguageDesc
|
||||||
|
{
|
||||||
|
Language lang_id;
|
||||||
|
uint32 spell_id;
|
||||||
|
uint32 skill_id;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern LanguageDesc lang_description[LANGUAGES_COUNT];
|
||||||
|
MANGOS_DLL_SPEC LanguageDesc const* GetLanguageDescByID(uint32 lang);
|
||||||
|
|
||||||
class PlayerDumpReader;
|
class PlayerDumpReader;
|
||||||
|
|
||||||
class ObjectMgr
|
class ObjectMgr
|
||||||
@@ -732,7 +732,7 @@ class ObjectMgr
|
|||||||
return &iter->second;
|
return &iter->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
VendorItemList const* GetNpcVendorItemList(uint32 entry) const
|
VendorItemData const* GetNpcVendorItemList(uint32 entry) const
|
||||||
{
|
{
|
||||||
CacheVendorItemMap::const_iterator iter = m_mCacheVendorItemMap.find(entry);
|
CacheVendorItemMap::const_iterator iter = m_mCacheVendorItemMap.find(entry);
|
||||||
if(iter == m_mCacheVendorItemMap.end())
|
if(iter == m_mCacheVendorItemMap.end())
|
||||||
@@ -740,6 +740,9 @@ class ObjectMgr
|
|||||||
|
|
||||||
return &iter->second;
|
return &iter->second;
|
||||||
}
|
}
|
||||||
|
void AddVendorItem(uint32 entry,uint32 item, uint32 maxcount, uint32 incrtime, uint32 ExtendedCost);
|
||||||
|
bool RemoveVendorItem(uint32 entry,uint32 item);
|
||||||
|
bool IsVendorItemValid( uint32 vendor_entry, uint32 item, uint32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* pl = NULL ) const;
|
||||||
protected:
|
protected:
|
||||||
uint32 m_auctionid;
|
uint32 m_auctionid;
|
||||||
uint32 m_mailid;
|
uint32 m_mailid;
|
||||||
|
|||||||
+1
-1
@@ -1742,7 +1742,7 @@ void Pet::CastPetAura(PetAura const* aura)
|
|||||||
|
|
||||||
if(auraId == 35696) // Demonic Knowledge
|
if(auraId == 35696) // Demonic Knowledge
|
||||||
{
|
{
|
||||||
int32 basePoints = aura->GetDamage() * (GetStat(STAT_STAMINA) + GetStat(STAT_INTELLECT)) / 100;
|
int32 basePoints = int32(aura->GetDamage() * (GetStat(STAT_STAMINA) + GetStat(STAT_INTELLECT)) / 100);
|
||||||
CastCustomSpell(this,auraId,&basePoints, NULL, NULL, true );
|
CastCustomSpell(this,auraId,&basePoints, NULL, NULL, true );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
+34
-17
@@ -5794,7 +5794,7 @@ void Player::RewardReputation(Unit *pVictim, float rate)
|
|||||||
if(!pVictim || pVictim->GetTypeId() == TYPEID_PLAYER)
|
if(!pVictim || pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ReputationOnKillEntry const* Rep = objmgr.GetReputationOnKilEntry(pVictim->GetEntry());
|
ReputationOnKillEntry const* Rep = objmgr.GetReputationOnKilEntry(((Creature*)pVictim)->GetCreatureInfo()->Entry);
|
||||||
|
|
||||||
if(!Rep)
|
if(!Rep)
|
||||||
return;
|
return;
|
||||||
@@ -16380,21 +16380,29 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// load vendor items if not yet
|
VendorItemData const* vItems = pCreature->GetVendorItems();
|
||||||
pCreature->LoadGoods();
|
if(!vItems || vItems->Empty())
|
||||||
|
{
|
||||||
|
SendBuyError( BUY_ERR_CANT_FIND_ITEM, pCreature, item, 0);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
CreatureItem* crItem = pCreature->FindItem(item);
|
VendorItem const* crItem = vItems->FindItem(item);
|
||||||
if(!crItem)
|
if(!crItem)
|
||||||
{
|
{
|
||||||
SendBuyError( BUY_ERR_CANT_FIND_ITEM, pCreature, item, 0);
|
SendBuyError( BUY_ERR_CANT_FIND_ITEM, pCreature, item, 0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( crItem->maxcount != 0 && crItem->count < count )
|
// check current item amount if it limited
|
||||||
|
if( crItem->maxcount != 0 )
|
||||||
|
{
|
||||||
|
if(pCreature->GetVendorItemCurrentCount(crItem) < pProto->BuyCount * count )
|
||||||
{
|
{
|
||||||
SendBuyError( BUY_ERR_ITEM_ALREADY_SOLD, pCreature, item, 0);
|
SendBuyError( BUY_ERR_ITEM_ALREADY_SOLD, pCreature, item, 0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( uint32(GetReputationRank(pProto->RequiredReputationFaction)) < pProto->RequiredReputationRank)
|
if( uint32(GetReputationRank(pProto->RequiredReputationFaction)) < pProto->RequiredReputationRank)
|
||||||
{
|
{
|
||||||
@@ -16508,17 +16516,16 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
|
|||||||
|
|
||||||
if(Item *it = StoreNewItem( dest, item, true ))
|
if(Item *it = StoreNewItem( dest, item, true ))
|
||||||
{
|
{
|
||||||
if( crItem->maxcount != 0 )
|
uint32 new_count = pCreature->UpdateVendorItemCurrentCount(crItem,pProto->BuyCount * count);
|
||||||
crItem->count -= pProto->BuyCount * count;
|
|
||||||
|
|
||||||
WorldPacket data(SMSG_BUY_ITEM, (8+4+4+4));
|
WorldPacket data(SMSG_BUY_ITEM, (8+4+4+4));
|
||||||
data << pCreature->GetGUID();
|
data << pCreature->GetGUID();
|
||||||
data << (uint32)crItem->id; // entry
|
data << (uint32)crItem->item;
|
||||||
data << (uint32)crItem->count;
|
data << (uint32)(crItem->maxcount > 0 ? new_count : 0xFFFFFFFF);
|
||||||
data << (uint32)count;
|
data << (uint32)count;
|
||||||
GetSession()->SendPacket(&data);
|
GetSession()->SendPacket(&data);
|
||||||
|
|
||||||
SendNewItem(it, count, true, false, false);
|
SendNewItem(it, pProto->BuyCount*count, true, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( IsEquipmentPos( bag, slot ) )
|
else if( IsEquipmentPos( bag, slot ) )
|
||||||
@@ -16548,17 +16555,16 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
|
|||||||
|
|
||||||
if(Item *it = EquipNewItem( dest, item, pProto->BuyCount * count, true ))
|
if(Item *it = EquipNewItem( dest, item, pProto->BuyCount * count, true ))
|
||||||
{
|
{
|
||||||
if( crItem->maxcount != 0 )
|
uint32 new_count = pCreature->UpdateVendorItemCurrentCount(crItem,pProto->BuyCount * count);
|
||||||
crItem->count -= pProto->BuyCount * count;
|
|
||||||
|
|
||||||
WorldPacket data(SMSG_BUY_ITEM, (8+4+4+4));
|
WorldPacket data(SMSG_BUY_ITEM, (8+4+4+4));
|
||||||
data << pCreature->GetGUID();
|
data << pCreature->GetGUID();
|
||||||
data << (uint32)crItem->id; // entry
|
data << (uint32)crItem->item;
|
||||||
data << (uint32)crItem->count;
|
data << (uint32)(crItem->maxcount > 0 ? new_count : 0xFFFFFFFF);
|
||||||
data << (uint32)count;
|
data << (uint32)count;
|
||||||
GetSession()->SendPacket(&data);
|
GetSession()->SendPacket(&data);
|
||||||
|
|
||||||
SendNewItem(it, count, true, false, false);
|
SendNewItem(it, pProto->BuyCount*count, true, false, false);
|
||||||
|
|
||||||
AutoUnequipOffhandIfNeed();
|
AutoUnequipOffhandIfNeed();
|
||||||
}
|
}
|
||||||
@@ -16569,7 +16575,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return crItem->maxcount!=0?true:false;
|
return crItem->maxcount!=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Player::GetMaxPersonalArenaRatingRequirement()
|
uint32 Player::GetMaxPersonalArenaRatingRequirement()
|
||||||
@@ -17174,7 +17180,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
|||||||
|
|
||||||
// set fly flag if in fly form or taxi flight to prevent visually drop at ground in showup moment
|
// set fly flag if in fly form or taxi flight to prevent visually drop at ground in showup moment
|
||||||
if(HasAuraType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED) || isInFlight())
|
if(HasAuraType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED) || isInFlight())
|
||||||
SetUnitMovementFlags(GetUnitMovementFlags() | MOVEMENTFLAG_FLYING2);
|
AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Player::SendInitialPacketsAfterAddToMap()
|
void Player::SendInitialPacketsAfterAddToMap()
|
||||||
@@ -18167,3 +18173,14 @@ bool ItemPosCount::isContainedIn(ItemPosCountVec const& vec) const
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Player::isAllowUseBattleGroundObject()
|
||||||
|
{
|
||||||
|
return ( //InBattleGround() && // in battleground - not need, check in other cases
|
||||||
|
!IsMounted() && // not mounted
|
||||||
|
!HasStealthAura() && // not stealthed
|
||||||
|
!HasInvisibilityAura() && // not invisible
|
||||||
|
!HasAura(SPELL_RECENTLY_DROPPED_FLAG, 0) && // can't pickup
|
||||||
|
isAlive() // live player
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1898,6 +1898,7 @@ class MANGOS_DLL_SPEC Player : public Unit
|
|||||||
void ClearAfkReports() { m_bgAfkReporter.clear(); }
|
void ClearAfkReports() { m_bgAfkReporter.clear(); }
|
||||||
|
|
||||||
bool GetBGAccessByLevel(uint32 bgTypeId) const;
|
bool GetBGAccessByLevel(uint32 bgTypeId) const;
|
||||||
|
bool isAllowUseBattleGroundObject();
|
||||||
|
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
/*** REST SYSTEM ***/
|
/*** REST SYSTEM ***/
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ void PointMovementGenerator<T>::Initialize(T &unit)
|
|||||||
unit.StopMoving();
|
unit.StopMoving();
|
||||||
Traveller<T> traveller(unit);
|
Traveller<T> traveller(unit);
|
||||||
i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z);
|
i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z);
|
||||||
|
|
||||||
|
if (unit.GetTypeId() == TYPEID_UNIT && ((Creature*)&unit)->canFly())
|
||||||
|
unit.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|||||||
+63
-62
@@ -23,105 +23,106 @@
|
|||||||
Quest::Quest(Field * questRecord)
|
Quest::Quest(Field * questRecord)
|
||||||
{
|
{
|
||||||
QuestId = questRecord[0].GetUInt32();
|
QuestId = questRecord[0].GetUInt32();
|
||||||
ZoneOrSort = questRecord[1].GetInt32();
|
QuestMethod = questRecord[1].GetUInt32();
|
||||||
SkillOrClass = questRecord[2].GetInt32();
|
ZoneOrSort = questRecord[2].GetInt32();
|
||||||
MinLevel = questRecord[3].GetUInt32();
|
SkillOrClass = questRecord[3].GetInt32();
|
||||||
QuestLevel = questRecord[4].GetUInt32();
|
MinLevel = questRecord[4].GetUInt32();
|
||||||
Type = questRecord[5].GetUInt32();
|
QuestLevel = questRecord[5].GetUInt32();
|
||||||
RequiredRaces = questRecord[6].GetUInt32();
|
Type = questRecord[6].GetUInt32();
|
||||||
RequiredSkillValue = questRecord[7].GetUInt32();
|
RequiredRaces = questRecord[7].GetUInt32();
|
||||||
RepObjectiveFaction = questRecord[8].GetUInt32();
|
RequiredSkillValue = questRecord[8].GetUInt32();
|
||||||
RepObjectiveValue = questRecord[9].GetInt32();
|
RepObjectiveFaction = questRecord[9].GetUInt32();
|
||||||
RequiredMinRepFaction = questRecord[10].GetUInt32();
|
RepObjectiveValue = questRecord[10].GetInt32();
|
||||||
RequiredMinRepValue = questRecord[11].GetInt32();
|
RequiredMinRepFaction = questRecord[11].GetUInt32();
|
||||||
RequiredMaxRepFaction = questRecord[12].GetUInt32();
|
RequiredMinRepValue = questRecord[12].GetInt32();
|
||||||
RequiredMaxRepValue = questRecord[13].GetInt32();
|
RequiredMaxRepFaction = questRecord[13].GetUInt32();
|
||||||
SuggestedPlayers = questRecord[14].GetUInt32();
|
RequiredMaxRepValue = questRecord[14].GetInt32();
|
||||||
LimitTime = questRecord[15].GetUInt32();
|
SuggestedPlayers = questRecord[15].GetUInt32();
|
||||||
QuestFlags = questRecord[16].GetUInt16();
|
LimitTime = questRecord[16].GetUInt32();
|
||||||
uint32 SpecialFlags = questRecord[17].GetUInt16();
|
QuestFlags = questRecord[17].GetUInt16();
|
||||||
CharTitleId = questRecord[18].GetUInt32();
|
uint32 SpecialFlags = questRecord[18].GetUInt16();
|
||||||
PrevQuestId = questRecord[19].GetInt32();
|
CharTitleId = questRecord[19].GetUInt32();
|
||||||
NextQuestId = questRecord[20].GetInt32();
|
PrevQuestId = questRecord[20].GetInt32();
|
||||||
ExclusiveGroup = questRecord[21].GetInt32();
|
NextQuestId = questRecord[21].GetInt32();
|
||||||
NextQuestInChain = questRecord[22].GetUInt32();
|
ExclusiveGroup = questRecord[22].GetInt32();
|
||||||
SrcItemId = questRecord[23].GetUInt32();
|
NextQuestInChain = questRecord[23].GetUInt32();
|
||||||
SrcItemCount = questRecord[24].GetUInt32();
|
SrcItemId = questRecord[24].GetUInt32();
|
||||||
SrcSpell = questRecord[25].GetUInt32();
|
SrcItemCount = questRecord[25].GetUInt32();
|
||||||
Title = questRecord[26].GetCppString();
|
SrcSpell = questRecord[26].GetUInt32();
|
||||||
Details = questRecord[27].GetCppString();
|
Title = questRecord[27].GetCppString();
|
||||||
Objectives = questRecord[28].GetCppString();
|
Details = questRecord[28].GetCppString();
|
||||||
OfferRewardText = questRecord[29].GetCppString();
|
Objectives = questRecord[29].GetCppString();
|
||||||
RequestItemsText = questRecord[30].GetCppString();
|
OfferRewardText = questRecord[30].GetCppString();
|
||||||
EndText = questRecord[31].GetCppString();
|
RequestItemsText = questRecord[31].GetCppString();
|
||||||
|
EndText = questRecord[32].GetCppString();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||||
ObjectiveText[i] = questRecord[32+i].GetCppString();
|
ObjectiveText[i] = questRecord[33+i].GetCppString();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||||
ReqItemId[i] = questRecord[36+i].GetUInt32();
|
ReqItemId[i] = questRecord[37+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||||
ReqItemCount[i] = questRecord[40+i].GetUInt32();
|
ReqItemCount[i] = questRecord[41+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
||||||
ReqSourceId[i] = questRecord[44+i].GetUInt32();
|
ReqSourceId[i] = questRecord[45+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
||||||
ReqSourceCount[i] = questRecord[48+i].GetUInt32();
|
ReqSourceCount[i] = questRecord[49+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
|
||||||
ReqSourceRef[i] = questRecord[52+i].GetUInt32();
|
ReqSourceRef[i] = questRecord[53+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||||
ReqCreatureOrGOId[i] = questRecord[56+i].GetInt32();
|
ReqCreatureOrGOId[i] = questRecord[57+i].GetInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||||
ReqCreatureOrGOCount[i] = questRecord[60+i].GetUInt32();
|
ReqCreatureOrGOCount[i] = questRecord[61+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
|
||||||
ReqSpell[i] = questRecord[64+i].GetUInt32();
|
ReqSpell[i] = questRecord[65+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
||||||
RewChoiceItemId[i] = questRecord[68+i].GetUInt32();
|
RewChoiceItemId[i] = questRecord[69+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
|
||||||
RewChoiceItemCount[i] = questRecord[74+i].GetUInt32();
|
RewChoiceItemCount[i] = questRecord[75+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
|
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
|
||||||
RewItemId[i] = questRecord[80+i].GetUInt32();
|
RewItemId[i] = questRecord[81+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
|
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
|
||||||
RewItemCount[i] = questRecord[84+i].GetUInt32();
|
RewItemCount[i] = questRecord[85+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
||||||
RewRepFaction[i] = questRecord[88+i].GetUInt32();
|
RewRepFaction[i] = questRecord[89+i].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
|
||||||
RewRepValue[i] = questRecord[93+i].GetInt32();
|
RewRepValue[i] = questRecord[94+i].GetInt32();
|
||||||
|
|
||||||
RewOrReqMoney = questRecord[98].GetInt32();
|
RewOrReqMoney = questRecord[99].GetInt32();
|
||||||
RewMoneyMaxLevel = questRecord[99].GetUInt32();
|
RewMoneyMaxLevel = questRecord[100].GetUInt32();
|
||||||
RewSpell = questRecord[100].GetUInt32();
|
RewSpell = questRecord[101].GetUInt32();
|
||||||
RewSpellCast = questRecord[101].GetUInt32();
|
RewSpellCast = questRecord[102].GetUInt32();
|
||||||
RewMailTemplateId = questRecord[102].GetUInt32();
|
RewMailTemplateId = questRecord[103].GetUInt32();
|
||||||
RewMailDelaySecs = questRecord[103].GetUInt32();
|
RewMailDelaySecs = questRecord[104].GetUInt32();
|
||||||
PointMapId = questRecord[104].GetUInt32();
|
PointMapId = questRecord[105].GetUInt32();
|
||||||
PointX = questRecord[105].GetFloat();
|
PointX = questRecord[106].GetFloat();
|
||||||
PointY = questRecord[106].GetFloat();
|
PointY = questRecord[107].GetFloat();
|
||||||
PointOpt = questRecord[107].GetUInt32();
|
PointOpt = questRecord[108].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
||||||
DetailsEmote[i] = questRecord[108+i].GetUInt32();
|
DetailsEmote[i] = questRecord[109+i].GetUInt32();
|
||||||
|
|
||||||
IncompleteEmote = questRecord[112].GetUInt32();
|
IncompleteEmote = questRecord[113].GetUInt32();
|
||||||
CompleteEmote = questRecord[113].GetUInt32();
|
CompleteEmote = questRecord[114].GetUInt32();
|
||||||
|
|
||||||
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
|
||||||
OfferRewardEmote[i] = questRecord[114+i].GetInt32();
|
OfferRewardEmote[i] = questRecord[115+i].GetInt32();
|
||||||
|
|
||||||
QuestStartScript = questRecord[118].GetUInt32();
|
QuestStartScript = questRecord[119].GetUInt32();
|
||||||
QuestCompleteScript = questRecord[119].GetUInt32();
|
QuestCompleteScript = questRecord[120].GetUInt32();
|
||||||
|
|
||||||
QuestFlags |= SpecialFlags << 16;
|
QuestFlags |= SpecialFlags << 16;
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -114,7 +114,7 @@ enum __QuestFlags
|
|||||||
{
|
{
|
||||||
// Flags used at server and sended to client
|
// Flags used at server and sended to client
|
||||||
QUEST_FLAGS_STAY_ALIVE = 1, // Not used currently
|
QUEST_FLAGS_STAY_ALIVE = 1, // Not used currently
|
||||||
QUEST_FLAGS_EVENT = 2, // Not used currently
|
QUEST_FLAGS_PARTY_ACCEPT = 2, // Not used currently. If player in party, all players that can accept this quest will receive confirmation box to accept quest CMSG_QUEST_CONFIRM_ACCEPT/SMSG_QUEST_CONFIRM_ACCEPT
|
||||||
QUEST_FLAGS_EXPLORATION = 4, // Not used currently
|
QUEST_FLAGS_EXPLORATION = 4, // Not used currently
|
||||||
QUEST_FLAGS_SHARABLE = 8, // Can be shared: Player::CanShareQuest()
|
QUEST_FLAGS_SHARABLE = 8, // Can be shared: Player::CanShareQuest()
|
||||||
//QUEST_FLAGS_NONE2 = 16, // Not used currently
|
//QUEST_FLAGS_NONE2 = 16, // Not used currently
|
||||||
@@ -167,6 +167,7 @@ class Quest
|
|||||||
|
|
||||||
// table data accessors:
|
// table data accessors:
|
||||||
uint32 GetQuestId() const { return QuestId; }
|
uint32 GetQuestId() const { return QuestId; }
|
||||||
|
uint32 GetQuestMethod() const { return QuestMethod; }
|
||||||
int32 GetZoneOrSort() const { return ZoneOrSort; }
|
int32 GetZoneOrSort() const { return ZoneOrSort; }
|
||||||
int32 GetSkillOrClass() const { return SkillOrClass; }
|
int32 GetSkillOrClass() const { return SkillOrClass; }
|
||||||
uint32 GetMinLevel() const { return MinLevel; }
|
uint32 GetMinLevel() const { return MinLevel; }
|
||||||
@@ -212,7 +213,7 @@ class Quest
|
|||||||
uint32 GetQuestStartScript() const { return QuestStartScript; }
|
uint32 GetQuestStartScript() const { return QuestStartScript; }
|
||||||
uint32 GetQuestCompleteScript() const { return QuestCompleteScript; }
|
uint32 GetQuestCompleteScript() const { return QuestCompleteScript; }
|
||||||
bool IsRepeatable() const { return QuestFlags & QUEST_MANGOS_FLAGS_REPEATABLE; }
|
bool IsRepeatable() const { return QuestFlags & QUEST_MANGOS_FLAGS_REPEATABLE; }
|
||||||
bool IsAutoComplete() const { return Objectives.empty(); }
|
bool IsAutoComplete() const { return QuestMethod ? false : true; }
|
||||||
uint32 GetFlags() const { return QuestFlags; }
|
uint32 GetFlags() const { return QuestFlags; }
|
||||||
bool IsDaily() const { return QuestFlags & QUEST_FLAGS_DAILY; }
|
bool IsDaily() const { return QuestFlags & QUEST_FLAGS_DAILY; }
|
||||||
|
|
||||||
@@ -255,6 +256,7 @@ class Quest
|
|||||||
// table data
|
// table data
|
||||||
protected:
|
protected:
|
||||||
uint32 QuestId;
|
uint32 QuestId;
|
||||||
|
uint32 QuestMethod;
|
||||||
int32 ZoneOrSort;
|
int32 ZoneOrSort;
|
||||||
int32 SkillOrClass;
|
int32 SkillOrClass;
|
||||||
uint32 MinLevel;
|
uint32 MinLevel;
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
|
|||||||
{
|
{
|
||||||
float X,Y,Z,z,nx,ny,nz,wander_distance,ori,dist;
|
float X,Y,Z,z,nx,ny,nz,wander_distance,ori,dist;
|
||||||
|
|
||||||
creature.GetRespawnCoord(X, Y, Z);
|
|
||||||
creature.GetRespawnCoord(X, Y, Z, &ori, &wander_distance);
|
creature.GetRespawnCoord(X, Y, Z, &ori, &wander_distance);
|
||||||
|
|
||||||
z = creature.GetPositionZ();
|
z = creature.GetPositionZ();
|
||||||
@@ -50,6 +49,11 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
|
|||||||
|
|
||||||
nx = X + distanceX;
|
nx = X + distanceX;
|
||||||
ny = Y + distanceY;
|
ny = Y + distanceY;
|
||||||
|
|
||||||
|
// prevent invalid coordinates generation
|
||||||
|
MaNGOS::NormalizeMapCoord(nx);
|
||||||
|
MaNGOS::NormalizeMapCoord(ny);
|
||||||
|
|
||||||
dist = distanceX*distanceX + distanceY*distanceY;
|
dist = distanceX*distanceX + distanceY*distanceY;
|
||||||
|
|
||||||
if (is_air_ok) // 3D system above ground and above water (flying mode)
|
if (is_air_ok) // 3D system above ground and above water (flying mode)
|
||||||
@@ -87,7 +91,7 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
|
|||||||
if (is_air_ok)
|
if (is_air_ok)
|
||||||
{
|
{
|
||||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||||
creature.SetUnitMovementFlags(MOVEMENTFLAG_FLYING2);
|
creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
}
|
}
|
||||||
//else if (is_water_ok) // Swimming mode to be done with more than this check
|
//else if (is_water_ok) // Swimming mode to be done with more than this check
|
||||||
else
|
else
|
||||||
@@ -105,7 +109,7 @@ RandomMovementGenerator<Creature>::Initialize(Creature &creature)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (creature.canFly())
|
if (creature.canFly())
|
||||||
creature.SetUnitMovementFlags(MOVEMENTFLAG_FLYING2);
|
creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
else
|
else
|
||||||
creature.SetUnitMovementFlags(irand(0,RUNNING_CHANCE_RANDOMMV) > 0 ? MOVEMENTFLAG_WALK_MODE : MOVEMENTFLAG_NONE );
|
creature.SetUnitMovementFlags(irand(0,RUNNING_CHANCE_RANDOMMV) > 0 ? MOVEMENTFLAG_WALK_MODE : MOVEMENTFLAG_NONE );
|
||||||
_setRandomLocation(creature);
|
_setRandomLocation(creature);
|
||||||
@@ -144,7 +148,7 @@ RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff
|
|||||||
if(i_nextMoveTime.Passed())
|
if(i_nextMoveTime.Passed())
|
||||||
{
|
{
|
||||||
if (creature.canFly())
|
if (creature.canFly())
|
||||||
creature.SetUnitMovementFlags(MOVEMENTFLAG_FLYING2);
|
creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
else
|
else
|
||||||
creature.SetUnitMovementFlags(irand(0,RUNNING_CHANCE_RANDOMMV) > 0 ? MOVEMENTFLAG_WALK_MODE : MOVEMENTFLAG_NONE);
|
creature.SetUnitMovementFlags(irand(0,RUNNING_CHANCE_RANDOMMV) > 0 ? MOVEMENTFLAG_WALK_MODE : MOVEMENTFLAG_NONE);
|
||||||
_setRandomLocation(creature);
|
_setRandomLocation(creature);
|
||||||
|
|||||||
@@ -3681,6 +3681,11 @@ uint8 Spell::CanCast(bool strict)
|
|||||||
(!m_targets.getItemTarget() || !m_targets.getItemTarget()->GetProto()->LockID || m_targets.getItemTarget()->GetOwner() != m_caster ) )
|
(!m_targets.getItemTarget() || !m_targets.getItemTarget()->GetProto()->LockID || m_targets.getItemTarget()->GetOwner() != m_caster ) )
|
||||||
return SPELL_FAILED_BAD_TARGETS;
|
return SPELL_FAILED_BAD_TARGETS;
|
||||||
|
|
||||||
|
// In BattleGround players can use only flags and banners
|
||||||
|
if( ((Player*)m_caster)->InBattleGround() &&
|
||||||
|
!((Player*)m_caster)->isAllowUseBattleGroundObject() )
|
||||||
|
return SPELL_FAILED_TRY_AGAIN;
|
||||||
|
|
||||||
// get the lock entry
|
// get the lock entry
|
||||||
LockEntry const *lockInfo = NULL;
|
LockEntry const *lockInfo = NULL;
|
||||||
if (GameObject* go=m_targets.getGOTarget())
|
if (GameObject* go=m_targets.getGOTarget())
|
||||||
|
|||||||
@@ -52,6 +52,8 @@
|
|||||||
#include "Language.h"
|
#include "Language.h"
|
||||||
#include "SocialMgr.h"
|
#include "SocialMgr.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
#include "TemporarySummon.h"
|
||||||
|
|
||||||
|
|
||||||
pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
||||||
{
|
{
|
||||||
@@ -1006,6 +1008,74 @@ void Spell::EffectDummy(uint32 i)
|
|||||||
m_caster->CastSpell(m_caster,42337,true,NULL);
|
m_caster->CastSpell(m_caster,42337,true,NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
case 37573: //Temporal Phase Modulator
|
||||||
|
{
|
||||||
|
if(!unitTarget)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TemporarySummon* tempSummon = dynamic_cast<TemporarySummon*>(unitTarget);
|
||||||
|
if(!tempSummon)
|
||||||
|
return;
|
||||||
|
|
||||||
|
uint32 health = tempSummon->GetHealth();
|
||||||
|
const uint32 entry_list[6] = {21821, 21820, 21817};
|
||||||
|
|
||||||
|
float x = tempSummon->GetPositionX();
|
||||||
|
float y = tempSummon->GetPositionY();
|
||||||
|
float z = tempSummon->GetPositionZ();
|
||||||
|
float o = tempSummon->GetOrientation();
|
||||||
|
|
||||||
|
tempSummon->UnSummon();
|
||||||
|
|
||||||
|
Creature* pCreature = m_caster->SummonCreature(entry_list[urand(0, 2)], x, y, z, o,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,180000);
|
||||||
|
if (!pCreature)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pCreature->SetHealth(health);
|
||||||
|
|
||||||
|
if(pCreature->AI())
|
||||||
|
pCreature->AI()->AttackStart(m_caster);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
case 34665: //Administer Antidote
|
||||||
|
{
|
||||||
|
if(!unitTarget || m_caster->GetTypeId() != TYPEID_PLAYER )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if(!unitTarget)
|
||||||
|
return;
|
||||||
|
|
||||||
|
TemporarySummon* tempSummon = dynamic_cast<TemporarySummon*>(unitTarget);
|
||||||
|
if(!tempSummon)
|
||||||
|
return;
|
||||||
|
|
||||||
|
uint32 health = tempSummon->GetHealth();
|
||||||
|
|
||||||
|
float x = tempSummon->GetPositionX();
|
||||||
|
float y = tempSummon->GetPositionY();
|
||||||
|
float z = tempSummon->GetPositionZ();
|
||||||
|
float o = tempSummon->GetOrientation();
|
||||||
|
tempSummon->UnSummon();
|
||||||
|
|
||||||
|
Creature* pCreature = m_caster->SummonCreature(16992, x, y, z, o,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,180000);
|
||||||
|
if (!pCreature)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pCreature->SetHealth(health);
|
||||||
|
((Player*)m_caster)->KilledMonster(16992,pCreature->GetGUID());
|
||||||
|
|
||||||
|
if (pCreature->AI())
|
||||||
|
pCreature->AI()->AttackStart(m_caster);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
case 44997: // Converting Sentry
|
||||||
|
{
|
||||||
|
//Converted Sentry Credit
|
||||||
|
m_caster->CastSpell(m_caster, 45009, true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
case 45030: // Impale Emissary
|
case 45030: // Impale Emissary
|
||||||
{
|
{
|
||||||
// Emissary of Hate Credit
|
// Emissary of Hate Credit
|
||||||
@@ -1102,6 +1172,16 @@ void Spell::EffectDummy(uint32 i)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
case 32826:
|
||||||
|
{
|
||||||
|
if ( unitTarget && unitTarget->GetTypeId() == TYPEID_UNIT )
|
||||||
|
{
|
||||||
|
//Polymorph Cast Visual Rank 1
|
||||||
|
const uint32 spell_list[6] = {32813, 32816, 32817, 32818, 32819, 32820};
|
||||||
|
unitTarget->CastSpell( unitTarget, spell_list[urand(0, 5)], true);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SPELLFAMILY_WARRIOR:
|
case SPELLFAMILY_WARRIOR:
|
||||||
@@ -2760,28 +2840,27 @@ void Spell::EffectOpenLock(uint32 /*i*/)
|
|||||||
if( goInfo->type == GAMEOBJECT_TYPE_BUTTON && goInfo->button.noDamageImmune ||
|
if( goInfo->type == GAMEOBJECT_TYPE_BUTTON && goInfo->button.noDamageImmune ||
|
||||||
goInfo->type == GAMEOBJECT_TYPE_GOOBER && goInfo->goober.losOK )
|
goInfo->type == GAMEOBJECT_TYPE_GOOBER && goInfo->goober.losOK )
|
||||||
{
|
{
|
||||||
if(BattleGround *bg = player->GetBattleGround())// in battleground
|
//isAllowUseBattleGroundObject() already called in CanCast()
|
||||||
{
|
// in battleground check
|
||||||
if( !player->IsMounted() && // not mounted
|
if(BattleGround *bg = player->GetBattleGround())
|
||||||
!player->HasStealthAura() && // not stealthed
|
|
||||||
!player->HasInvisibilityAura() && // not invisible
|
|
||||||
player->isAlive() ) // live player
|
|
||||||
{
|
{
|
||||||
// check if it's correct bg
|
// check if it's correct bg
|
||||||
if(bg && bg->GetTypeID() == BATTLEGROUND_AB)
|
if(bg && bg->GetTypeID() == BATTLEGROUND_AB)
|
||||||
bg->EventPlayerClickedOnFlag(player, gameObjTarget);
|
bg->EventPlayerClickedOnFlag(player, gameObjTarget);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if (goInfo->type == GAMEOBJECT_TYPE_FLAGSTAND)
|
else if (goInfo->type == GAMEOBJECT_TYPE_FLAGSTAND)
|
||||||
{
|
{
|
||||||
|
//isAllowUseBattleGroundObject() already called in CanCast()
|
||||||
|
// in battleground check
|
||||||
if(BattleGround *bg = player->GetBattleGround())
|
if(BattleGround *bg = player->GetBattleGround())
|
||||||
|
{
|
||||||
if(bg->GetTypeID() == BATTLEGROUND_EY)
|
if(bg->GetTypeID() == BATTLEGROUND_EY)
|
||||||
bg->EventPlayerClickedOnFlag(player, gameObjTarget);
|
bg->EventPlayerClickedOnFlag(player, gameObjTarget);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
lockId = gameObjTarget->GetLockId();
|
lockId = gameObjTarget->GetLockId();
|
||||||
guid = gameObjTarget->GetGUID();
|
guid = gameObjTarget->GetGUID();
|
||||||
}
|
}
|
||||||
@@ -4751,6 +4830,16 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||||||
unitTarget->CastSpell(unitTarget, spellId, true);
|
unitTarget->CastSpell(unitTarget, spellId, true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
//5,000 Gold
|
||||||
|
case 46642:
|
||||||
|
{
|
||||||
|
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||||
|
return;
|
||||||
|
|
||||||
|
((Player*)unitTarget)->ModifyMoney(50000000);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN )
|
if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN )
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ TargetedMovementGenerator<T>::_setTargetLocation(T &owner)
|
|||||||
Traveller<T> traveller(owner);
|
Traveller<T> traveller(owner);
|
||||||
i_destinationHolder.SetDestination(traveller, x, y, z);
|
i_destinationHolder.SetDestination(traveller, x, y, z);
|
||||||
owner.addUnitState(UNIT_STAT_CHASE);
|
owner.addUnitState(UNIT_STAT_CHASE);
|
||||||
|
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
||||||
|
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@@ -94,6 +96,10 @@ TargetedMovementGenerator<T>::Initialize(T &owner)
|
|||||||
if(!&owner)
|
if(!&owner)
|
||||||
return;
|
return;
|
||||||
owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||||
|
|
||||||
|
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
||||||
|
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
|
|
||||||
_setTargetLocation(owner);
|
_setTargetLocation(owner);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,6 +149,9 @@ TargetedMovementGenerator<T>::Update(T &owner, const uint32 & time_diff)
|
|||||||
if( owner.IsStopped() && !i_destinationHolder.HasArrived() )
|
if( owner.IsStopped() && !i_destinationHolder.HasArrived() )
|
||||||
{
|
{
|
||||||
owner.addUnitState(UNIT_STAT_CHASE);
|
owner.addUnitState(UNIT_STAT_CHASE);
|
||||||
|
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
|
||||||
|
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
|
|
||||||
i_destinationHolder.StartTravel(traveller);
|
i_destinationHolder.StartTravel(traveller);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint32 &di
|
|||||||
// Now we re-set destination to same node and start travel
|
// Now we re-set destination to same node and start travel
|
||||||
creature.addUnitState(UNIT_STAT_ROAMING);
|
creature.addUnitState(UNIT_STAT_ROAMING);
|
||||||
if (creature.canFly())
|
if (creature.canFly())
|
||||||
creature.SetUnitMovementFlags(MOVEMENTFLAG_FLYING2);
|
creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
const WaypointNode &node = i_path->at(i_currentNode);
|
const WaypointNode &node = i_path->at(i_currentNode);
|
||||||
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
||||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||||
@@ -176,7 +176,7 @@ WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint32 &di
|
|||||||
{
|
{
|
||||||
creature.addUnitState(UNIT_STAT_ROAMING);
|
creature.addUnitState(UNIT_STAT_ROAMING);
|
||||||
if (creature.canFly())
|
if (creature.canFly())
|
||||||
creature.SetUnitMovementFlags(MOVEMENTFLAG_FLYING2);
|
creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
|
||||||
const WaypointNode &node = i_path->at(i_currentNode);
|
const WaypointNode &node = i_path->at(i_currentNode);
|
||||||
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
|
||||||
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 0,2,6721,676
|
FILEVERSION 0,3,6731,680
|
||||||
PRODUCTVERSION 0,2,6721,676
|
PRODUCTVERSION 0,3,6731,680
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -69,12 +69,12 @@ BEGIN
|
|||||||
BLOCK "080004b0"
|
BLOCK "080004b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileDescription", "TrinityCore"
|
VALUE "FileDescription", "TrinityCore"
|
||||||
VALUE "FileVersion", "0, 2, 6721, 676"
|
VALUE "FileVersion", "0, 3, 6731, 680"
|
||||||
VALUE "InternalName", "TrinityCore"
|
VALUE "InternalName", "TrinityCore"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2008"
|
VALUE "LegalCopyright", "Copyright (C) 2008"
|
||||||
VALUE "OriginalFilename", "TrinityCore.exe"
|
VALUE "OriginalFilename", "TrinityCore.exe"
|
||||||
VALUE "ProductName", "TrinityCore"
|
VALUE "ProductName", "TrinityCore"
|
||||||
VALUE "ProductVersion", "0, 2, 6721, 676"
|
VALUE "ProductVersion", "0, 3, 6731, 680"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 0,2,6721,676
|
FILEVERSION 0,3,6731,680
|
||||||
PRODUCTVERSION 0,2,6721,676
|
PRODUCTVERSION 0,3,6731,680
|
||||||
FILEFLAGSMASK 0x17L
|
FILEFLAGSMASK 0x17L
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -69,12 +69,12 @@ BEGIN
|
|||||||
BLOCK "080004b0"
|
BLOCK "080004b0"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "FileDescription", "TrinityRealm"
|
VALUE "FileDescription", "TrinityRealm"
|
||||||
VALUE "FileVersion", "0, 2, 6721, 676"
|
VALUE "FileVersion", "0, 3, 6731, 680"
|
||||||
VALUE "InternalName", "TrinityRealm"
|
VALUE "InternalName", "TrinityRealm"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2008"
|
VALUE "LegalCopyright", "Copyright (C) 2008"
|
||||||
VALUE "OriginalFilename", "TrinityRealm.exe"
|
VALUE "OriginalFilename", "TrinityRealm.exe"
|
||||||
VALUE "ProductName", "TrinityRealm"
|
VALUE "ProductName", "TrinityRealm"
|
||||||
VALUE "ProductVersion", "0, 2, 6721, 676"
|
VALUE "ProductVersion", "0, 3, 6731, 680"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
+10
-10
@@ -49,7 +49,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/MP /wd 4748"
|
AdditionalOptions="/MP /wd 4748 /wd 4244"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
|
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
|
||||||
PreprocessorDefinitions="ACE_BUILD_DLL;_DEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
|
PreprocessorDefinitions="ACE_BUILD_DLL;_DEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/MP /wd 4748"
|
AdditionalOptions="/MP /wd 4748 /wd 4244"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
|
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
|
||||||
PreprocessorDefinitions="ACE_BUILD_DLL;_DEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
|
PreprocessorDefinitions="ACE_BUILD_DLL;_DEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
|
||||||
@@ -228,7 +228,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/MP /wd 4748"
|
AdditionalOptions="/MP /wd 4748 /wd 4244"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
|
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
|
||||||
PreprocessorDefinitions="ACE_BUILD_DLL;NDEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
|
PreprocessorDefinitions="ACE_BUILD_DLL;NDEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
|
||||||
@@ -316,7 +316,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalOptions="/MP /wd 4748"
|
AdditionalOptions="/MP /wd 4748 /wd 4244"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
|
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
|
||||||
PreprocessorDefinitions="ACE_BUILD_DLL;NDEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
|
PreprocessorDefinitions="ACE_BUILD_DLL;NDEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
|
||||||
@@ -2853,11 +2853,11 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\dep\ACE_wrappers\ace\OS_Errno.h"
|
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_errno.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_errno.h"
|
RelativePath="..\..\dep\ACE_wrappers\ace\OS_Errno.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@@ -3237,11 +3237,11 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\dep\ACE_wrappers\ace\OS_String.h"
|
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_string.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_string.h"
|
RelativePath="..\..\dep\ACE_wrappers\ace\OS_String.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@@ -3285,11 +3285,11 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\sys\os_time.h"
|
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_time.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_time.h"
|
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\sys\os_time.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
|||||||
Reference in New Issue
Block a user