Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 9 additions & 36 deletions dep/g3dlite/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,49 +276,22 @@ void System::init() {
# elif defined(G3D_OSX)

// Operating System:
SInt32 macVersion;
Gestalt(gestaltSystemVersion, &macVersion);

int major = (macVersion >> 8) & 0xFF;
int minor = (macVersion >> 4) & 0xF;
int revision = macVersion & 0xF;
char osVersion[256];
size_t size = sizeof(osVersion);
sysctlbyname("kern.osrelease", &osVersion, &size, NULL, 0);

{
char c[1000];
sprintf(c, "OS X %x.%x.%x", major, minor, revision);
m_operatingSystem = c;
}
m_operatingSystem = "macOS ";
m_operatingSystem += osVersion;

// Clock Cycle Timing Information:
Gestalt('pclk', &m_OSXCPUSpeed);
m_cpuSpeed = iRound((double)m_OSXCPUSpeed / (1024 * 1024));
m_secondsPerNS = 1.0 / 1.0e9;

// System Architecture:
const NXArchInfo* pInfo = NXGetLocalArchInfo();

if (pInfo) {
m_cpuArch = pInfo->description;

switch (pInfo->cputype) {
case CPU_TYPE_POWERPC:
switch(pInfo->cpusubtype){
case CPU_SUBTYPE_POWERPC_750:
case CPU_SUBTYPE_POWERPC_7400:
case CPU_SUBTYPE_POWERPC_7450:
m_cpuVendor = "Motorola";
break;
case CPU_SUBTYPE_POWERPC_970:
m_cpuVendor = "IBM";
break;
}
break;

case CPU_TYPE_I386:
m_cpuVendor = "Intel";
break;
}
}
# if defined(__aarch64__)
m_cpuArch = "ARM64";
m_cpuVendor = "Apple";
# endif
# endif

initTime();
Expand Down
11 changes: 7 additions & 4 deletions sql/base/dbc/cmangos_fixes/Spell.sql

Large diffs are not rendered by default.

140 changes: 0 additions & 140 deletions sql/scriptdev2/scriptdev2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1483,12 +1483,6 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadc
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadcast_text_id,comment) VALUES
('-1000100','Come, little ones. Face me!','0','1','0','0','9071','azuregos SAY_TELEPORT'),

('-1000101','Follow me, $N. I''ll take you to the Defias hideout. But you better protect me or I am as good as dead.','0','0','7','0','9','defias traitor SAY_START'),
('-1000102','The entrance is hidden here in Moonbrook. Keep your eyes peeled for thieves. They want me dead.','0','0','7','0','10','defias traitor SAY_PROGRESS'),
('-1000103','You can go tell Stoutmantle this is where the Defias Gang is holed up, $N.','0','0','7','0','11','defias traitor SAY_END'),
('-1000104','$N coming in fast! Prepare to fight!','0','0','7','0','489','defias traitor SAY_AGGRO_1'),
('-1000105','Help!','0','0','7','0','485','defias traitor SAY_AGGRO_2'),

('-1000106','Everyone ready?','0','0','1','0','8284','torek SAY_READY'),
('-1000107','Ok, let''s move out!','0','0','1','0','8278','torek SAY_MOVE'),
('-1000108','Prepare yourselves. Silverwing is just around the bend.','0','0','1','0','8282','torek SAY_PREPARE'),
Expand Down Expand Up @@ -1981,23 +1975,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,broadc
('-1000553','Be ready, $n. I hear the council returning. Prepare to ambush!','0','0','0','0','542','deathstalker_faerleia SAY_START'),
('-1000554','Well done. A blow to Arugal no doubt!','0','0','0','0','545','deathstalker_faerleia SAY_END'),

('-1000561','$n, my wounds are grave. Forgive my slow pace but my injuries won''t allow me to walk any faster.','0','0','0','0','25','SAY_CORPORAL_KEESHAN_1'),
('-1000562','Ah, fresh air at last! I need a moment to rest, $N.','0','0','0','0','26','SAY_CORPORAL_KEESHAN_2'),
('-1000563','The Blackrock infestation is thick in these parts. I will do my best to keep the pace, $N. Let''s go!','0','0','0','0','27','SAY_CORPORAL_KEESHAN_3'),
('-1000564','Marshal Marris, sir. Corporal Keeshan of the 12th Sabre Regiment returned from battle and reporting for duty!','0','0','0','0','29','SAY_CORPORAL_KEESHAN_4'),
('-1000565','Brave $c, thank you for rescuing me! I am sure Marshal Marris will reward your kind deed, $N.','0','0','0','0','30','SAY_CORPORAL_KEESHAN_5'),

('-1000566','Stand back! Stand clear! The infernal will need to be given a wide berth!','0','0','0','0','9634','SAY_NIBY_1'),
('-1000567','BOW DOWN TO THE ALMIGHTY! BOW DOWN BEFORE MY INFERNAL DESTRO... chicken?','0','0','0','0','9635','SAY_NIBY_2'),
('-1000568','%s rolls on the floor laughing.','0','2','0','0','9636','EMOTE_IMPSY_1'),
('-1000569','Niby, you''re an idiot.','0','0','0','0','9637','SAY_IMPSY_1'),
('-1000570','Silence, servant! Vengeance will be mine! Death to Stormwind! Death by chicken!','0','0','0','0','9638','SAY_NIBY_3'),

('-1000571','Help! I''ve only one hand to defend myself with.','0','0','0','0','510','SAY_MIRAN_1'),
('-1000572','Feel the power of the Dark Iron Dwarves!','0','0','0','0','1936','SAY_DARK_IRON_DWARF'),
('-1000573','Send them on! I''m not afraid of some scrawny beasts!','0','0','0','0','511','SAY_MIRAN_2'),
('-1000574','Ah, here at last! It''s going to feel so good to get rid of these barrels.','0','0','0','0','498','SAY_MIRAN_3'),

('-1000579','There! Destroy him! The Cipher must be recovered!','0','0','0','25','19012','spirit hunter - SAY_VENERATUS_SPAWN'),

('-1000582','Help! Please, you must help me!','0','0','0','0','7124','Galen - periodic say'),
Expand Down Expand Up @@ -4768,129 +4751,6 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES

TRUNCATE script_waypoint;
INSERT INTO script_waypoint (Entry, PathId, Point, PositionX, PositionY, PositionZ, Orientation, WaitTime, ScriptId, Comment) VALUES
(349,0,1,-8769.59,-2185.73,141.975,0,0,0,''),
(349,0,2,-8776.54,-2193.78,140.96,0,0,0,''),
(349,0,3,-8783.29,-2194.82,140.462,0,0,0,''),
(349,0,4,-8792.52,-2188.8,142.078,0,0,0,''),
(349,0,5,-8807.55,-2186.1,141.504,0,0,0,''),
(349,0,6,-8818,-2184.8,139.153,0,0,0,''),
(349,0,7,-8825.81,-2188.84,138.459,0,0,0,''),
(349,0,8,-8827.52,-2199.81,139.622,0,0,0,''),
(349,0,9,-8821.14,-2212.64,143.126,0,0,0,''),
(349,0,10,-8809.18,-2230.46,143.438,0,0,0,''),
(349,0,11,-8797.04,-2240.72,146.548,0,0,0,''),
(349,0,12,-8795.24,-2251.81,146.808,0,0,0,''),
(349,0,13,-8780.16,-2258.62,148.554,0,0,0,''),
(349,0,14,-8762.65,-2259.56,151.144,0,0,0,''),
(349,0,15,-8754.36,-2253.74,152.243,0,0,0,''),
(349,0,16,-8741.87,-2251,154.486,0,0,0,''),
(349,0,17,-8733.22,-2251.01,154.36,0,0,0,''),
(349,0,18,-8717.47,-2245.04,154.686,0,0,0,''),
(349,0,19,-8712.24,-2246.83,154.709,0,0,0,''),
(349,0,20,-8693.84,-2240.41,152.91,0,0,0,''),
(349,0,21,-8681.82,-2245.33,155.518,0,0,0,''),
(349,0,22,-8669.86,-2252.77,154.854,0,0,0,''),
(349,0,23,-8670.56,-2264.69,156.978,0,0,0,''),
(349,0,24,-8676.56,-2269.2,155.411,0,0,0,''),
(349,0,25,-8673.34,-2288.65,157.054,0,0,0,''),
(349,0,26,-8677.76,-2302.56,155.917,0,16000,0,'Corp. Keeshan - Short Break Outside'),
(349,0,27,-8682.46,-2321.69,155.917,0,0,0,''),
(349,0,28,-8690.4,-2331.78,155.971,0,0,0,''),
(349,0,29,-8715.1,-2353.95,156.188,0,0,0,''),
(349,0,30,-8748.04,-2370.7,157.988,0,0,0,''),
(349,0,31,-8780.9,-2421.37,156.109,0,0,0,''),
(349,0,32,-8792.01,-2453.38,142.746,0,0,0,''),
(349,0,33,-8804.78,-2472.43,134.192,0,0,0,''),
(349,0,34,-8841.35,-2503.63,132.276,0,0,0,''),
(349,0,35,-8867.57,-2529.89,134.739,0,0,0,''),
(349,0,36,-8870.67,-2542.08,131.044,0,0,0,''),
(349,0,37,-8922.05,-2585.31,132.446,0,0,0,''),
(349,0,38,-8949.08,-2596.87,132.537,0,0,0,''),
(349,0,39,-8993.46,-2604.04,130.756,0,0,0,''),
(349,0,40,-9006.71,-2598.47,127.966,0,0,0,''),
(349,0,41,-9038.96,-2572.71,124.748,0,0,0,''),
(349,0,42,-9046.92,-2560.64,124.447,0,0,0,''),
(349,0,43,-9066.69,-2546.63,123.11,0,0,0,''),
(349,0,44,-9077.54,-2541.67,121.17,0,0,0,''),
(349,0,45,-9125.32,-2490.06,116.057,0,0,0,''),
(349,0,46,-9145.06,-2442.24,108.232,0,0,0,''),
(349,0,47,-9158.2,-2425.36,105.5,0,0,0,''),
(349,0,48,-9151.92,-2393.67,100.856,0,0,0,''),
(349,0,49,-9165.19,-2376.03,94.8215,0,0,0,''),
(349,0,50,-9187.1,-2360.52,89.9231,0,0,0,''),
(349,0,51,-9235.44,-2305.24,77.9253,0,0,0,''),
(349,0,52,-9264.73,-2292.92,70.0089,0,0,0,''),
(349,0,53,-9277.47,-2296.19,68.0896,0,2500,0,'Corp. Keeshan - quest-finish'),
(349,0,54,-9277.47,-2296.19,68.0896,0,0,0,'Corp. Keeshan - Say Goodbye'),
(467,0,1,-10508.4,1068,55.21,0,0,0,''),
(467,0,2,-10518.3,1074.84,53.96,0,0,0,''),
(467,0,3,-10534.8,1081.92,49.88,0,0,0,''),
(467,0,4,-10546.5,1084.88,50.13,0,0,0,''),
(467,0,5,-10555.3,1084.45,45.75,0,0,0,''),
(467,0,6,-10566.6,1083.53,42.1,0,0,0,''),
(467,0,7,-10575.8,1082.34,39.46,0,0,0,''),
(467,0,8,-10585.7,1081.08,37.77,0,0,0,''),
(467,0,9,-10600.1,1078.19,36.23,0,0,0,''),
(467,0,10,-10608.7,1076.08,35.88,0,0,0,''),
(467,0,11,-10621.3,1073,35.4,0,0,0,''),
(467,0,12,-10638.1,1060.18,33.61,0,0,0,''),
(467,0,13,-10655.9,1038.99,33.48,0,0,0,''),
(467,0,14,-10664.7,1030.54,32.7,0,0,0,''),
(467,0,15,-10708.7,1033.86,33.32,0,0,0,''),
(467,0,16,-10754.4,1017.93,32.79,0,0,0,''),
(467,0,17,-10802.3,1018.01,32.16,0,0,0,''),
(467,0,18,-10832.6,1009.04,32.71,0,0,0,''),
(467,0,19,-10866.6,1006.51,31.71,0,0,0,''),
(467,0,20,-10880,1005.1,32.84,0,0,0,''),
(467,0,21,-10892.5,1001.32,34.46,0,0,0,''),
(467,0,22,-10906.1,997.11,36.15,0,0,0,''),
(467,0,23,-10922.3,1002.23,35.74,0,0,0,''),
(467,0,24,-10936.3,1023.38,36.52,0,0,0,''),
(467,0,25,-10933.3,1052.61,35.85,0,0,0,''),
(467,0,26,-10940.2,1077.66,36.49,0,0,0,''),
(467,0,27,-10957.1,1099.33,36.83,0,0,0,''),
(467,0,28,-10956.5,1119.9,36.73,0,0,0,''),
(467,0,29,-10939.3,1150.75,37.42,0,0,0,''),
(467,0,30,-10915.1,1202.09,36.55,0,0,0,''),
(467,0,31,-10892.6,1257.03,33.37,0,0,0,''),
(467,0,32,-10891.9,1306.66,35.45,0,0,0,''),
(467,0,33,-10896.2,1327.86,37.77,0,0,0,''),
(467,0,34,-10906,1368.05,40.91,0,0,0,''),
(467,0,35,-10910.2,1389.33,42.62,0,0,0,''),
(467,0,36,-10915.4,1417.72,42.93,0,0,0,''),
(467,0,37,-10926.4,1421.18,43.04,0,0,0,'walk here and say'),
(467,0,38,-10952.3,1421.74,43.4,0,0,0,''),
(467,0,39,-10980,1411.38,42.79,0,0,0,''),
(467,0,40,-11006.1,1420.47,43.26,0,0,0,''),
(467,0,41,-11022,1450.59,43.09,0,0,0,''),
(467,0,42,-11025.4,1491.59,43.15,0,0,0,''),
(467,0,43,-11036.1,1508.32,43.28,0,0,0,''),
(467,0,44,-11060.7,1526.72,43.19,0,0,0,''),
(467,0,45,-11072.8,1527.77,43.2,3.22,5000,0,'say and quest credit'),
(1379,0,1,-5751.12,-3441.01,301.743,0,0,0,''),
(1379,0,2,-5738.58,-3485.14,302.41,0,0,0,''),
(1379,0,3,-5721.62,-3507.85,304.011,0,0,0,''),
(1379,0,4,-5710.21,-3527.97,304.708,0,0,0,''),
(1379,0,5,-5706.92,-3542.89,304.871,0,0,0,''),
(1379,0,6,-5701.53,-3551.24,305.962,0,0,0,''),
(1379,0,7,-5699.53,-3555.69,306.505,0,0,0,''),
(1379,0,8,-5690.56,-3571.98,309.035,0,0,0,''),
(1379,0,9,-5678.61,-3587.17,310.607,0,0,0,''),
(1379,0,10,-5677.05,-3594.35,311.527,0,0,0,''),
(1379,0,11,-5674.39,-3605.19,312.239,0,0,0,''),
(1379,0,12,-5674.45,-3614.39,312.337,0,0,0,''),
(1379,0,13,-5673.05,-3630.56,311.105,0,0,0,''),
(1379,0,14,-5680.34,-3645.44,315.185,0,0,0,''),
(1379,0,15,-5684.46,-3650.05,314.687,0,0,0,''),
(1379,0,16,-5693.9,-3674.14,313.03,0,0,0,''),
(1379,0,17,-5701.43,-3712.54,313.959,0,0,0,''),
(1379,0,18,-5698.79,-3720.88,316.943,0,0,0,''),
(1379,0,19,-5699.95,-3733.63,318.597,0,0,0,'Protecting the Shipment - Ambush'),
(1379,0,20,-5698.61,-3754.74,322.047,0,0,0,''),
(1379,0,21,-5688.68,-3769,323.957,0,0,0,''),
(1379,0,22,-5688.14,-3782.65,322.667,0,0,0,''),
(1379,0,23,-5699.23,-3792.65,322.448,0,30000,0,'Protecting the Shipment - End'),
(1379,0,24,-5700.8,-3792.78,322.588,0,0,5000,''),
(1840,0,1,2689.68,-1937.47,72.14,0,0,0,''),
(1840,0,2,2683.11,-1926.82,72.14,0,0,0,''),
(1840,0,3,2678.73,-1919.42,68.86,2.11887,1000,0,'escort paused'),
Expand Down
70 changes: 38 additions & 32 deletions src/game/AI/ScriptDevAI/scripts/eastern_kingdoms/loch_modan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@ enum
{
QUEST_PROTECTING_THE_SHIPMENT = 309,

SAY_MIRAN_1 = -1000571,
SAY_DARK_IRON_DWARF = -1000572,
SAY_MIRAN_2 = -1000573,
SAY_MIRAN_3 = -1000574,
SAY_MIRAN_1 = 510,
SAY_MIRAN_2 = 511,
SAY_MIRAN_3 = 498,

NPC_DARK_IRON_DWARF = 2149
SAY_DARK_IRON_RAIDER = 512,
NPC_DARK_IRON_RAIDER = 2149,

MIRAN_ESCORT_PATH = 1379
};

struct Location
Expand All @@ -51,13 +53,13 @@ struct Location

static const Location m_afAmbushSpawn[] =
{
{ -5691.93f, -3745.91f, 319.159f, 2.21f},
{ -5706.98f, -3745.39f, 318.728f, 1.04f}
{ -5705.012f, -3736.6575f, 318.56738f, 0.57595f},
{ -5696.1943f, -3736.78f, 318.58145f, 2.40855f}
};

struct npc_miranAI: public npc_escortAI
{
npc_miranAI(Creature* pCreature): npc_escortAI(pCreature)
npc_miranAI(Creature* creature): npc_escortAI(creature)
{
Reset();
}
Expand All @@ -74,57 +76,61 @@ struct npc_miranAI: public npc_escortAI
{
switch (uiPointId)
{
case 19:
DoScriptText(SAY_MIRAN_1, m_creature);
m_creature->SummonCreature(NPC_DARK_IRON_DWARF, m_afAmbushSpawn[0].m_fX, m_afAmbushSpawn[0].m_fY, m_afAmbushSpawn[0].m_fZ, m_afAmbushSpawn[0].m_fO, TEMPSPAWN_CORPSE_TIMED_DESPAWN, 25000);
m_creature->SummonCreature(NPC_DARK_IRON_DWARF, m_afAmbushSpawn[1].m_fX, m_afAmbushSpawn[1].m_fY, m_afAmbushSpawn[1].m_fZ, m_afAmbushSpawn[1].m_fO, TEMPSPAWN_CORPSE_TIMED_DESPAWN, 25000);
case 16:
DoBroadcastText(SAY_MIRAN_1, m_creature);
break;
case 23:
DoScriptText(SAY_MIRAN_3, m_creature);
if (Player* pPlayer = GetPlayerForEscort())
pPlayer->RewardPlayerAndGroupAtEventExplored(QUEST_PROTECTING_THE_SHIPMENT, m_creature);
case 17:
SetEscortPaused(true);
m_creature->SummonCreature(NPC_DARK_IRON_RAIDER, m_afAmbushSpawn[0].m_fX, m_afAmbushSpawn[0].m_fY, m_afAmbushSpawn[0].m_fZ, m_afAmbushSpawn[0].m_fO, TEMPSPAWN_CORPSE_TIMED_DESPAWN, 25000);
m_creature->SummonCreature(NPC_DARK_IRON_RAIDER, m_afAmbushSpawn[1].m_fX, m_afAmbushSpawn[1].m_fY, m_afAmbushSpawn[1].m_fZ, m_afAmbushSpawn[1].m_fO, TEMPSPAWN_CORPSE_TIMED_DESPAWN, 25000);
break;
case 24:
m_creature->ForcedDespawn(5000);
case 21:
DoBroadcastText(SAY_MIRAN_3, m_creature);
if (Player* player = GetPlayerForEscort())
player->RewardPlayerAndGroupAtEventExplored(QUEST_PROTECTING_THE_SHIPMENT, m_creature);
SetEscortPaused(true);
m_creature->ForcedDespawn(15000);
break;
}
}

void SummonedCreatureJustDied(Creature* pSummoned) override
void SummonedCreatureJustDied(Creature* summoned) override
{
if (pSummoned->GetEntry() == NPC_DARK_IRON_DWARF)
if (summoned->GetEntry() == NPC_DARK_IRON_RAIDER)
{
--m_uiDwarves;
if (!m_uiDwarves)
DoScriptText(SAY_MIRAN_2, m_creature);
{
DoBroadcastText(SAY_MIRAN_2, m_creature);
SetEscortPaused(false);
}
}
}

void JustSummoned(Creature* pSummoned) override
void JustSummoned(Creature* summoned) override
{
if (pSummoned->GetEntry() == NPC_DARK_IRON_DWARF)
if (summoned->GetEntry() == NPC_DARK_IRON_RAIDER)
{
if (!m_uiDwarves)
DoScriptText(SAY_DARK_IRON_DWARF, pSummoned);
++m_uiDwarves;
pSummoned->AI()->AttackStart(m_creature);
summoned->AI()->AttackStart(m_creature);
DoBroadcastText(SAY_DARK_IRON_RAIDER, summoned);
}
}
};

bool QuestAccept_npc_miran(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
bool QuestAccept_npc_miran(Player* player, Creature* creature, const Quest* quest)
{
if (pQuest->GetQuestId() == QUEST_PROTECTING_THE_SHIPMENT)
if (quest->GetQuestId() == QUEST_PROTECTING_THE_SHIPMENT)
{
if (npc_miranAI* pEscortAI = dynamic_cast<npc_miranAI*>(pCreature->AI()))
pEscortAI->Start(false, pPlayer, pQuest);
if (npc_miranAI* pEscortAI = dynamic_cast<npc_miranAI*>(creature->AI()))
pEscortAI->Start(false, player, quest, false, false, MIRAN_ESCORT_PATH);
}
return true;
}

UnitAI* GetAI_npc_miran(Creature* pCreature)
UnitAI* GetAI_npc_miran(Creature* creature)
{
return new npc_miranAI(pCreature);
return new npc_miranAI(creature);
}

void AddSC_loch_modan()
Expand Down
Loading