Skip to content

Instantly share code, notes, and snippets.

View Sar777's full-sized avatar
🎯
Focusing

Arthur Antonevich Sar777

🎯
Focusing
  • Minsk, Republic of Belarus
  • 04:18 (UTC +03:00)
View GitHub Profile
@Sar777
Sar777 / gist:1513716
Created December 23, 2011 09:31
crash all the time
Program received signal SIGSEGV, Segmentation fault.
[Cambiando a Thread 0x7fffdb379700 (LWP 5269)]
0x00007ffff5af5c2d in free () from /lib/libc.so.6
(gdb) info threads
13 Thread 0x7fffd8b74700 (LWP 5274) 0x00007ffff5b5ef23 in epoll_wait () from /lib/libc.so.6
12 Thread 0x7fffd9375700 (LWP 5273) 0x00007ffff5b5ef23 in epoll_wait () from /lib/libc.so.6
11 Thread 0x7fffd9b76700 (LWP 5272) 0x00007ffff5e0a36d in nanosleep () from /lib/libpthread.so.0
10 Thread 0x7fffda377700 (LWP 5271) 0x00007ffff5b2220d in nanosleep () from /lib/libc.so.6
select * from instance_encounters_mangosR2 where not exists (select * from instance_encounters_mangos where instance_encounters_mangos.entry = instance_encounters_mangosR2.entry
and
instance_encounters_mangos.creditEntry = instance_encounters_mangosR2.creditEntry
and
instance_encounters_mangos.creditType = instance_encounters_mangosR2.creditType
and
instance_encounters_mangos.lastEncounterDungeon = instance_encounters_mangosR2.lastEncounterDungeon);
select * from instance_encounters_mangos where not exists (select * from instance_encounters_mangosR2 where instance_encounters_mangos.entry = instance_encounters_mangosR2.entry
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index 05932c5..c1e4680 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -6647,7 +6647,7 @@ bool ChatHandler::HandleInstanceSaveDataCommand(char* /*args*/)
bool ChatHandler::HandleGMListFullCommand(char* /*args*/)
{
///- Get the accounts with GM Level >0
- QueryResult *result = LoginDatabase.Query( "SELECT username,gmlevel FROM account WHERE gmlevel > 0" );
+ QueryResult *result = LoginDatabase.PQuery("SELECT ac.username, ac.gmlevel, af.Security FROM account ac LEFT JOIN account_forcepermission af ON ac.id = af.AccountID WHERE (af.Security > 0 AND realmID = '%u') OR ac.gmlevel > 0", sConfig.GetIntDefault("RealmID", 0));
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 5ef23bf..9beaea7 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -524,7 +524,7 @@ void Spell::FillTargetMap()
for (int j = 0; j < i; ++j)
{
SpellEffectEntry const* spellEffect1 = m_spellInfo->GetSpellEffect(SpellEffectIndex(j));
- if (!spellEffect)
+ if (!spellEffect1)
else if (GetPlayer()->IsInCombat() && GetPlayer()->GetMap())
{
GetPlayer()->CombatStop();
GetPlayer()->getHostileRefManager().setOnlineOfflineState(false);
GetPlayer()->RemoveAllAurasOnDeath();
// build set of player who attack _player or who have pet attacking of _player
std::set<Player*> aset;
// GuidSet& attackers = GetPlayer()->GetMap()->GetAttackersFor(GetPlayer()->GetObjectGuid());
//
diff --git a/src/shared/ObjectUpdateTaskBase.h b/src/shared/ObjectUpdateTaskBase.h
index bfb1323..50aeb5a 100644
--- a/src/shared/ObjectUpdateTaskBase.h
+++ b/src/shared/ObjectUpdateTaskBase.h
@@ -46,7 +46,10 @@ template <class T> class ObjectUpdateRequest : public ACE_Method_Request
virtual int call()
{
- m_obj.Update(m_diff);
+ if (!m_obj.IsBroken())

TaskScheduler guide for TrinityCore Scripting

Basic Usage

The Basis usage is like EventMap

#include "TaskScheduler"

TaskScheduler scheduler;
public class AccountObjectSetCheats
{
public bool AutoBattle { get; set; }
public AccountobjectSetCheats Type { get; set; }
public sbyte SlotLockCheat { get; set; }
}
public class AccountObjectGetProfile
{
public string Filename { get; set; }
@Sar777
Sar777 / db-connect-test.php
Created February 2, 2016 21:42 — forked from chales/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
Npc 74578(Hallucination)
Casted: 148360(Cosmetic - Druid Morph w/ Cast);
-------------------
Npc 75094(Utrophis)
Casted: 164964(Sundering Life), 168214(Whirlpool), 168226(Whirlpool), 168228(Whirlpool), 168229(Whirlpool), 168286(Water Bolt);
Npc 76465(Pale Flinger)
Casted: 148360(Cosmetic - Druid Morph w/ Cast), 150054(Illusion), 150187(Deranged), 150421(Illusory Bolt), 150448(Illusory Charge), 150457(Illusory Charge);
-------------------