Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
merge with rsa
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp.dallig committed Dec 23, 2010
1 parent f872485 commit 662df61
Show file tree
Hide file tree
Showing 175 changed files with 58,168 additions and 3,686 deletions.
150 changes: 104 additions & 46 deletions Makefile.am

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions ScriptMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,16 @@ Script *m_scripts[MAX_SCRIPTS];

Config SD2Config;

QueryResult* strSD2Pquery(char* str)
{
return SD2Database.Query(str);
}

void FillSpellSummary();

void LoadDatabase()
{

std::string strSD2DBinfo = SD2Config.GetStringDefault("ScriptDev2DatabaseInfo", "");

if (strSD2DBinfo.empty())
Expand All @@ -47,8 +53,6 @@ void LoadDatabase()
return;
}

SD2Database.HaltDelayThread();

}

struct TSpellSummary {
Expand All @@ -67,6 +71,7 @@ void ScriptsFree()
delete m_scripts[i];

num_sc_scripts = 0;
SD2Database.HaltDelayThread();
}

MANGOS_DLL_EXPORT
Expand Down Expand Up @@ -270,7 +275,9 @@ bool GossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32
if (!tmpscript || !tmpscript->pGossipSelect)
return false;

pPlayer->PlayerTalkClass->ClearMenus();
// pPlayer->PlayerTalkClass->ClearMenus();
// this expression is wrong, where 'return false' from script's GossipSelect
// not return menu ID (cleared in this string) and not allow to work with database-based menus

return tmpscript->pGossipSelect(pPlayer, pCreature, uiSender, uiAction);
}
Expand Down
4 changes: 4 additions & 0 deletions ScriptMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "Common.h"
#include "DBCStructure.h"
#include "Database/DatabaseEnv.h"

class Player;
class Creature;
Expand Down Expand Up @@ -75,6 +76,9 @@ struct Script
//Generic scripting text function
void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget = NULL);

//DB query
QueryResult* strSD2Pquery(char*);

#if COMPILER == COMPILER_GNU
#define FUNC_PTR(name,callconvention,returntype,parameters) typedef returntype(*name)parameters __attribute__ ((callconvention));
#else
Expand Down
164 changes: 124 additions & 40 deletions VC100/100ScriptDev2.vcxproj

Large diffs are not rendered by default.

1,182 changes: 843 additions & 339 deletions VC100/100ScriptDev2.vcxproj.filters

Large diffs are not rendered by default.

Loading

0 comments on commit 662df61

Please sign in to comment.