mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
- sessions should now be persistent across restarts for some browsers (namely IE)
- show tab: unknown source last in items list page - fixed displaying related event on creature detail page - parse aura:190 on spell detail page
This commit is contained in:
@@ -71,9 +71,8 @@ foreach ($sets as $k => $v)
|
|||||||
define('CFG_'.strtoupper($k), $v['s'] ?: intVal($v['i']));
|
define('CFG_'.strtoupper($k), $v['s'] ?: intVal($v['i']));
|
||||||
|
|
||||||
|
|
||||||
$protocoll = 'http://';
|
$secure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || CFG_FORCE_SSL;
|
||||||
if ((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || CFG_FORCE_SSL)
|
$protocoll = $secure ? 'https://' : 'http://';
|
||||||
$protocoll = 'https://';
|
|
||||||
|
|
||||||
define('STATIC_URL', substr($protocoll.$_SERVER['SERVER_NAME'].strtr($_SERVER['SCRIPT_NAME'], ['index.php' => '']), 0, -1).'/static'); // points js to images & scripts (change here if you want to use a separate subdomain)
|
define('STATIC_URL', substr($protocoll.$_SERVER['SERVER_NAME'].strtr($_SERVER['SCRIPT_NAME'], ['index.php' => '']), 0, -1).'/static'); // points js to images & scripts (change here if you want to use a separate subdomain)
|
||||||
define('HOST_URL', substr($protocoll.$_SERVER['SERVER_NAME'].strtr($_SERVER['SCRIPT_NAME'], ['index.php' => '']), 0, -1)); // points js to executable files
|
define('HOST_URL', substr($protocoll.$_SERVER['SERVER_NAME'].strtr($_SERVER['SCRIPT_NAME'], ['index.php' => '']), 0, -1)); // points js to executable files
|
||||||
@@ -87,7 +86,7 @@ Util::execTime(CFG_DEBUG);
|
|||||||
|
|
||||||
|
|
||||||
// Setup Session
|
// Setup Session
|
||||||
ini_set('session.cookie_httponly', true);
|
session_set_cookie_params(15 * YEAR, '/', '', $secure, true);
|
||||||
session_cache_limiter('private');
|
session_cache_limiter('private');
|
||||||
session_start();
|
session_start();
|
||||||
if (User::init())
|
if (User::init())
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ class CurrencyPage extends GenericPage
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// tab: created by (spell) [for items its handled in Util::getLootSource()]
|
// tab: created by (spell) [for items its handled in Loot::getByContainer()]
|
||||||
if ($this->typeId == 104)
|
if ($this->typeId == 104)
|
||||||
{
|
{
|
||||||
$createdBy = new SpellList(array(['effect1Id', 45], ['effect2Id', 45], ['effect3Id', 45], 'OR'));
|
$createdBy = new SpellList(array(['effect1Id', 45], ['effect2Id', 45], ['effect3Id', 45], 'OR'));
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ class ItemsPage extends GenericPage
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 3: // source
|
case 3: // source
|
||||||
$groups = [0, 1, 2, 3, 4, 5, 10, 11, 12];
|
$groups = [1, 2, 3, 4, 5, 10, 11, 12, 0];
|
||||||
$nameSource = Lang::$game['sources'];
|
$nameSource = Lang::$game['sources'];
|
||||||
$this->forceTabs = true;
|
$this->forceTabs = true;
|
||||||
|
|
||||||
|
|||||||
@@ -95,13 +95,10 @@ class NpcPage extends GenericPage
|
|||||||
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
|
$infobox = Lang::getInfoBoxForFlags($this->subject->getField('cuFlags'));
|
||||||
|
|
||||||
// Event
|
// Event
|
||||||
if ($_ = DB::Aowow()->selectRow('SELECT e.id, holidayId FROM ?_events e, game_event_creature gec, creature c WHERE e.id = ABS(gec.eventEntry) AND c.guid = gec.guid AND c.id = ?d', $this->typeId))
|
if ($_ = DB::Aowow()->selectCell('SELECT holidayId FROM ?_events e, game_event_creature gec, creature c WHERE e.id = ABS(gec.eventEntry) AND c.guid = gec.guid AND c.id = ?d', $this->typeId))
|
||||||
{
|
{
|
||||||
if ($h = $_['holidayId'])
|
$this->extendGlobalIds(TYPE_WORLDEVENT, $_);
|
||||||
{
|
$infobox[] = Util::ucFirst(Lang::$game['eventShort']).Lang::$main['colon'].'[event='.$_.']';
|
||||||
$this->extendGlobalIds(TYPE_WORLDEVENT, $_['id']);
|
|
||||||
$infobox[] = Util::ucFirst(Lang::$game['eventShort']).Lang::$main['colon'].'[event='.$h.']';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Level
|
// Level
|
||||||
|
|||||||
@@ -1873,7 +1873,6 @@ class SpellPage extends GenericPage
|
|||||||
break;
|
break;
|
||||||
case 78: // Mounted
|
case 78: // Mounted
|
||||||
case 56: // Transform
|
case 56: // Transform
|
||||||
{
|
|
||||||
if ($transform = $this->subject->getModelInfo($this->typeId))
|
if ($transform = $this->subject->getModelInfo($this->typeId))
|
||||||
{
|
{
|
||||||
$redButtons[BUTTON_VIEW3D] = ['type' => TYPE_NPC, 'displayId' => $transform['displayId']];
|
$redButtons[BUTTON_VIEW3D] = ['type' => TYPE_NPC, 'displayId' => $transform['displayId']];
|
||||||
@@ -1883,12 +1882,12 @@ class SpellPage extends GenericPage
|
|||||||
$bar = Lang::$main['colon'].Lang::$game['npc'].' #'.$effMV;;
|
$bar = Lang::$main['colon'].Lang::$game['npc'].' #'.$effMV;;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case 139: // Force Reaction
|
case 139: // Force Reaction
|
||||||
{
|
|
||||||
$bar = ' (<a href="?faction='.$effMV.'">'.FactionList::getName($effMV).'</a>)';
|
|
||||||
$foo['value'] = sprintf(Util::$dfnString, $foo['value'], Lang::$game['rep'][$foo['value']]);
|
$foo['value'] = sprintf(Util::$dfnString, $foo['value'], Lang::$game['rep'][$foo['value']]);
|
||||||
}
|
// DO NOT BREAK
|
||||||
|
case 190: // Mod Faction Reputation Gain
|
||||||
|
$bar = ' (<a href="?faction='.$effMV.'">'.FactionList::getName($effMV).'</a>)';
|
||||||
|
break; // also breaks for 139
|
||||||
}
|
}
|
||||||
$foo['name'] .= strstr($bar, 'href') || strstr($bar, '#') ? $bar : ($bar ? ' ('.$bar.')' : null);
|
$foo['name'] .= strstr($bar, 'href') || strstr($bar, '#') ? $bar : ($bar ? ' ('.$bar.')' : null);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user