Skip to content

Commit d2cc851

Browse files
authored
Merge pull request #141 from acidmanifesto/patch-1
update (3.3.5-solocraft): Maintence
2 parents 9688b16 + a4efa46 commit d2cc851

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/server/scripts/Custom/Solocraft.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ class SolocraftAnnounce : public PlayerScript
319319
void OnLogout(Player* player) override
320320
{
321321
//Remove database entry as the player has logged out
322-
CharacterDatabase.PExecute("DELETE FROM custom_solocraft_character_stats WHERE GUID = {}", player->GetGUID());
322+
CharacterDatabase.PExecute("DELETE FROM custom_solocraft_character_stats WHERE GUID = {}", player->GetGUID().GetCounter());
323323
}
324324
};
325325
class solocraft_player_instance_handler : public PlayerScript {
@@ -453,7 +453,7 @@ class solocraft_player_instance_handler : public PlayerScript {
453453
}
454454

455455
//Check Database for a current dungeon entry
456-
QueryResult result = CharacterDatabase.PQuery("SELECT `GUID`, `Difficulty`, `GroupSize`, `SpellPower`, `Stats` FROM `custom_solocraft_character_stats` WHERE GUID = {}", player->GetGUID());
456+
QueryResult result = CharacterDatabase.PQuery("SELECT `GUID`, `Difficulty`, `GroupSize`, `SpellPower`, `Stats` FROM `custom_solocraft_character_stats` WHERE GUID = {}", player->GetGUID().GetCounter());
457457

458458
//Modify Player Stats
459459
for (int32 i = STAT_STRENGTH; i < MAX_STATS; ++i) //STATS defined/enum in SharedDefines.h
@@ -499,7 +499,7 @@ class solocraft_player_instance_handler : public PlayerScript {
499499
ChatHandler(player->GetSession()).PSendSysMessage("|cffFF0000[SoloCraft] |cffFF8000 Player: %s entered %s - | cffFF0000BE ADVISED - You have been debuffed by offset : %f with a Class Balance Weight : %i. | cffFF8000 A group member already inside has the dungeon's full buff offset. No Spellpower buff will be applied to spell casters. ALL group members must exit the dungeon and re-enter to receive a balanced offset.", player->GetName().c_str(), map->GetMapName(), difficulty, classBalance);
500500
}
501501
// Save Player Dungeon Offsets to Database
502-
CharacterDatabase.PExecute("REPLACE INTO custom_solocraft_character_stats (GUID, Difficulty, GroupSize, SpellPower, Stats) VALUES ({}, {}, {}, {}, {})", player->GetGUID(), difficulty, numInGroup, SpellPowerBonus, SoloCraftStatsMult);
502+
CharacterDatabase.PExecute("REPLACE INTO custom_solocraft_character_stats (GUID, Difficulty, GroupSize, SpellPower, Stats) VALUES ({}, {}, {}, {}, {})", player->GetGUID().GetCounter(), difficulty, numInGroup, SpellPowerBonus, SoloCraftStatsMult);
503503
}
504504
else
505505
{
@@ -528,7 +528,7 @@ class solocraft_player_instance_handler : public PlayerScript {
528528
if (itr->guid != player->GetGUID())
529529
{
530530
//Database query to find difficulty for each group member that is currently in an instance
531-
QueryResult result = CharacterDatabase.PQuery("SELECT `GUID`, `Difficulty`, `GroupSize` FROM `custom_solocraft_character_stats` WHERE GUID = {}", itr->guid);
531+
QueryResult result = CharacterDatabase.PQuery("SELECT `GUID`, `Difficulty`, `GroupSize` FROM `custom_solocraft_character_stats` WHERE GUID = {}", itr->guid.GetCounter());
532532
if (result)
533533
{
534534
//Test for debuffs already give to other members - They cannot be used to determine the total offset because negative numbers will skew the total difficulty offset
@@ -546,7 +546,7 @@ class solocraft_player_instance_handler : public PlayerScript {
546546
void ClearBuffs(Player* player, Map* map)
547547
{
548548
//Database query to get offset from the last instance player exited
549-
QueryResult result = CharacterDatabase.PQuery("SELECT `GUID`, `Difficulty`, `GroupSize`, `SpellPower`, `Stats` FROM `custom_solocraft_character_stats` WHERE GUID = {}", player->GetGUID());
549+
QueryResult result = CharacterDatabase.PQuery("SELECT `GUID`, `Difficulty`, `GroupSize`, `SpellPower`, `Stats` FROM `custom_solocraft_character_stats` WHERE GUID = {}", player->GetGUID().GetCounter());
550550
if (result)
551551
{
552552
float difficulty = (*result)[1].GetFloat();
@@ -565,7 +565,7 @@ class solocraft_player_instance_handler : public PlayerScript {
565565
player->ApplySpellPowerBonus(SpellPowerBonus, false);
566566
}
567567
//Remove database entry as the player is no longer in an instance
568-
CharacterDatabase.PExecute("DELETE FROM custom_solocraft_character_stats WHERE GUID = {}", player->GetGUID());
568+
CharacterDatabase.PExecute("DELETE FROM custom_solocraft_character_stats WHERE GUID = {}", player->GetGUID().GetCounter());
569569
}
570570
}
571571
};

0 commit comments

Comments
 (0)