Skip to content

Instantly share code, notes, and snippets.

View walkline's full-sized avatar
🇺🇦

Anton Popovichenko walkline

🇺🇦
  • Mendix
  • The Hague
View GitHub Profile
diff --git a/notification/sender.go b/notification/sender.go
index 8fca35e..6657b60 100644
--- a/notification/sender.go
+++ b/notification/sender.go
@@ -110,6 +110,7 @@ func (this *Sender) send(users []auth.User, vote storage.Vote) {
if len(devices.AppleIds) > 0 {
fmt.Printf("Notification sender debug: Server: %s, Cert: %s, Key: %s\n", this.AppleServer, this.AppleCertPath, this.AppleKeyPath)
apn, err := apns.NewClient(this.AppleServer, this.AppleCertPath, this.AppleKeyPath)
+ apn.MAX_PAYLOAD_SIZE = 2048
if err != nil {
@walkline
walkline / tables.sql
Created September 14, 2015 13:34
tables.sql
DROP TABLE IF EXISTS `wp_masterslunch_dishes`;
CREATE TABLE `wp_masterslunch_dishes` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`description` text,
`category` varchar(255) NOT NULL,
`user_id` mediumint(9) NOT NULL,
`price` int(11) NOT NULL,
`weight` int(11) DEFAULT NULL,
@walkline
walkline / ebags.json
Last active September 24, 2015 13:44
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "eBags API",
"description": "\n## Authorization\nFor client authentication we will use `ApiAccessToken` which will be in the header of request.\n\nTo receive `ApiAccessToken`, client should make request to one of three endpoints - /members/RegisterResponsive, /members/SignInCustomer or /members/RefreshToken.\n\nAlso `ApiAccessToken` will be used in webview's requests. If site's backend will see `ApiAccessToken` in the header of request, and if client doesn't have cookies, than backend should create cookies using `ApiAccessToken`.\n\n## Steal/Deal of the Day\nWill be implemented by pushing notifications to customer.\n\nPayload for Steal/Deal of the Day should have `\"steal_deal_url\"` parameter.\n\nPayload for iOS device will be like:\n```json\n{\n \"aps\" : {\n ...\n }\n \n \"steal_deal_url\" : \"http://...\"\n}\n```\n## Bag Shazam\nWill be implemented by using api.pcsso.com. If we want to use this API
DELETE FROM `command` WHERE `name` = 'spectate';
INSERT INTO `command` (`name`, `security`, `help`) VALUES ('spectate', 0, 'Syntax: .spectate #player\nAllow player to spectate arena.');
DELETE FROM `command` WHERE `name` = 'spectatefrom';
INSERT INTO `command` (`name`, `security`, `help`) VALUES ('spectatefrom', 0, 'Syntax: .spectatefrom #player\nAllow player to spectate arena from anotherplayer.');
DELETE FROM `command` WHERE `name` = 'spectatecancel';
INSERT INTO `command` (`name`, `security`, `help`) VALUES ('spectatecancel', 0, 'Syntax: .spectatecancel\nDisable spectator mode.');
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index 4ad00f5..5356680 100755
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -1237,16 +1237,19 @@ void Battleground::EventPlayerLoggedOut(Player* player)
m_Players[guid].OfflineRemoveTime = sWorld->GetGameTime() + MAX_OFFLINE_TIME;
if (GetStatus() == STATUS_IN_PROGRESS)
{
- // drop flag and handle other cleanups
- RemovePlayer(player, guid, GetPlayerTeam(guid));
diff --git a/src/server/game/Chat/Commands/Level0.cpp b/src/server/game/Chat/Commands/Level0.cpp
index 9f9cedf..3449d9e 100755
--- a/src/server/game/Chat/Commands/Level0.cpp
+++ b/src/server/game/Chat/Commands/Level0.cpp
@@ -244,9 +244,9 @@ bool ChatHandler::HandleSpectateCommand(const char *args)
float x, y, z;
target->GetContactPoint(_player, x, y, z);
+ _player->SetSpectate(true);
_player->TeleportTo(target->GetMapId(), x, y, z, _player->GetAngle(target), TELE_TO_GM_MODE);
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
index 0d76759..8bd9a0a 100755
--- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
@@ -166,6 +166,14 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, Battlegr
sWorld->SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, Team->GetName().c_str(), ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating);
}
+ //arena 3x3 & 5x5 announce
+ if (isRated && ginfo->ArenaType > 2)
diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
index 0d76759..012cd1d 100755
--- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp
+++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp
@@ -166,6 +166,17 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, Battlegr
sWorld->SendWorldText(LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, Team->GetName().c_str(), ginfo->ArenaType, ginfo->ArenaType, ginfo->ArenaTeamRating);
}
+ //arena 3x3 & 5x5 announce
+ if (isRated && ginfo->ArenaType > 2 && leader)
diff --git a/src/server/game/Chat/Commands/Level0.cpp b/src/server/game/Chat/Commands/Level0.cpp
index 3449d9e..cd7ef2c 100755
--- a/src/server/game/Chat/Commands/Level0.cpp
+++ b/src/server/game/Chat/Commands/Level0.cpp
@@ -28,6 +28,7 @@
#include "SystemConfig.h"
#include "revision.h"
#include "Util.h"
+#include "ArenaTeamMgr.h"
UPDATE `gameobject_template` SET `flags` = 36 WHERE entry IN (185918, 185917, 183970, 183971, 183972, 183973, 183977, 183979, 183978, 183980);